🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

bauer-plugin-scrape

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bauer-plugin-scrape

Plugin for bauer to scrape content.

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
12
-14.29%
Maintainers
1
Weekly downloads
 
Created
Source

bauer-plugin-scrape

Plugin for bauer to make http requests.

Installation

npm install bauer-plugin-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 05 Sep 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