JSPM

scrapm

0.2.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q29752F
  • License MIT

more convenient scraper for node.js

Package Exports

  • scrapm

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scrapm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

scrapm

more convenient scraper for node.js

Usage

var scrapm = require('scrapm');

scrapm([options], callback);

options are request options:

  • url - (required) target url you want to scrape
  • blocked - default false, true if the server is blocking scraping by machine. it cheats the server by changhing 'User-Agent' in header.
  • encoding - default false, true if the encoding of the webpage is not utf-8.
  • sourceEncoding - default '', encoding of the webpage if options.encoding is true
  • targetEncoding - default '', encoding you want to get if options.encoding is true

callback is called with (err, $). You can manipulate DOM with $ as you want. $ is implemented with jsdom.

Dependencies

  • iconv
  • jsdom
  • request

License

MIT License