🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
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.

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
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 16 Apr 2016

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