Skip to main content

JS parsers: examples

info

Here are just a few examples of using JavaScript scrapers that demonstrate the basic functionality. Many more examples are published in the Scraper Catalog

JS::TitleParser

Parsing the HTML tag title on any page

JS::TextFromSE

Combining several built-in scrapers into one

Downloading files

Example of saving files of any size directly to disk

Working with CAPTCHA

Example of a JS scraper for working with CAPTCHAs

Working with ReCaptcha2

Example of a JS scraper for working with reCAPTCHAs

Working with ready-made scrapers

Example of getting results from a ready-made scraper inside a JS scraper

Working with SQLite DB

Example of creating a table, inserting and selecting data

Working with MySQL DB

Example of working with the mysql2 module, this scraper collects links from Google search results and writes them to the DB

Browsing through pages

An example of parsing a site by query with page navigation

Filtering by multiple features

Example of filtering pages by a large number of features, using fs to read the feature file

Filtering images by their content

Example of using Google Vision to determine the content of images

Posting to Wordpress blogs

Posting messages to Wordpress blogs using xmlrpc technology

Sending emails

Example of working with nodemailer (sending emails from a JS scraper). Yandex SMTP is used.

Creating page screenshots

Demonstration of working with puppeteer(Chrome) using the example of creating website screenshots

Telegram notifications

Getting notifications in Telegram about the end of domain registration period