scuff
v1.3.0
Published
One stop shop for web scraping with node. A lightweight wrapper for phantom, request, and cheerio.
Downloads
10
Maintainers
Readme
Scuff
One stop shop for web scraping with node. A lightweight wrapper for phantom, request, and cheerio.
Functions
static(url, callback, options)
Uses request to get an HTML body of static webpage. Returns a cheerio function, $
, that has jQuery like functionality in node (see cheerio's documentation).
Arguments
url
- URL of the page you'd like to scrape.callback
- Function with argumentserror
and a cheerio function (jQuery implementation in node) to easily navigate through the HTML or XML structure.options
-options.retries
allows you to set the number of attempts to get the requested data's HTML content. Utilizes exponential backoff to reduce and eliminate the number of network errors. Options.retries accepts anumber
between 1 and 5. Also accepts an objectoptions.cheerio
which will take any options accepted by htmlparser2
dynamic(url, callback, options)
Uses phantom to get HTML body of a dynamic site (includes dynamic content rendered by JavaScript). Returns a cheerio function, $
, that has jQuery like functionality in node (see cheerio's documentation).
Arguments
url
- URL of the page you'd like to scrape.callback
- Function with argumentserror
and a cheerio function (jQuery implementation in node) to easily navigate through the HTML or XML structure. Includes dynamic content rendered by JavaScript.options
-options.retries
allows you to set the number of attempts to get the requested data's HTML content. Utilizes exponential backoff to reduce and eliminate the number of network errors. Options.retries accepts anumber
between 1 and 5.