Socket
Book a DemoInstallSign in
Socket

bauer-crawler-scrape

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bauer-crawler-scrape

Plugin for bauer-crawler to scrape content.

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

bauer-crawler-scrape

Plugin for bauer-crawler to make http requests.

Installation

npm install bauer-crawler-scrape

Usage

module.exports = function(promise) {
  return promise.scrape("/path/to/html/input",{
    "a[href]": {
      "url": "attr:href"
    }
  }).then(function(outputFile) {
    // outputFile contains scraped data
  });
};
module.exports = function(promise) {
  return promise.return("/path/to/html/input")
    .scrape({
      "a[href]": {
        "url": "attr:href"
      }
    }).then(function(outputFile) {
    // outputFile contains scraped data
  });
};

Configuration

{
  workers: 1,
  slots: 1,
  delay: 0,
  cache: { // default options for bauer-cache
    json: false,
    expires: "1d",
    file: {
      dir: ".",
      ext: "txt"
    }
  }
}

API Summary

  • Promise
    • .scrape(scrape Object) :Promise
    • .scrape(source String, scrape Object) :Promise

License

MIT

Keywords

multi-thread

FAQs

Package last updated on 23 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts