1.3.0 • Published 10 years ago

scuff v1.3.0

Weekly downloads
18
License
MIT
Repository
github
Last release
10 years ago

Scuff

NPM version

NPM

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 arguments error 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 a number between 1 and 5. Also accepts an object options.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 arguments error 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 a number between 1 and 5.
1.3.0

10 years ago

1.2.0

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.0

10 years ago