yad2.js
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

yad2.js

API for Yad2 Website

Installation

npm i yad2.js

Usage

  1. Head over to https://yad2.co.il/
  2. Search for something
  3. Apply filters as you wish
  4. Copy the following into the console. every time you apply filter - you will get the complete URL
(() => {
    // Save a reference to the original open method
    var originalOpen = XMLHttpRequest.prototype.open;
  
    // Override the open method
    XMLHttpRequest.prototype.open = function(method, url) {
      // Check if the URL contains pattern 
      if (/\/feed-search-legacy|\/api\/feed\//.test(url)) {
        alert("Copy this URL: " + url);
      }
  
      // Call the original open method
      originalOpen.apply(this, arguments);
    };
})();
  1. Copy the URL and use it
import { feedSearch } from 'yad2.js'

const {responseData} = feedSearch('<URL>')
console.log(responseData.data) // TypeScript friendly!

Features

  • ✅ TypeScript friendly
  • 🍃 Super Lightweight
  • 🚀 Fast

Todo

Solve Captches using 2captcha

Package Sidebar

Install

npm i yad2.js

Weekly Downloads

0

Version

1.1.4

License

ISC

Unpacked Size

19.5 kB

Total Files

8

Last publish

Collaborators

  • thewh1teagle