开发者社区> 镜像站> NPM> scraping-knife
scraping-knife
Multi-tools for scraping web pages. It helps inject popular JS libraries for scraping to web page.
Last updated 6 months ago by rdashevsky .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install scraping-knife 
SYNC missed versions from official npm registry.

Nest Logo

GitHub license GitHub release GitHub contributors GitHub issues GitHub pull-requests saythanks

Description

Scraping-knife is an aggregating tool that provides an easy way to add libraries to a web page when you scraping the page.

Install

For npm:

npm install --save scraping-knife

For yarn:

yarn add scraping-knife

Example

For example we can inject scraping-knife to web page by puppeteer

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setBypassCSP(true);
await page.goto(pageUrl);
await page.addScriptTag({
  path: require.resolve('scraping-knife')
});

const results = await page.evaluate(async () => {
  return SK.$('#some-id').text();
});
await page.close();
await browser.close();

License

MIT licensed.

Current Tags

  • 0.2.4                                ...           latest (6 months ago)

7 Versions

  • 0.2.4                                ...           6 months ago
  • 0.2.3                                ...           6 months ago
  • 0.2.2                                ...           7 months ago
  • 0.2.1                                ...           7 months ago
  • 0.1.1                                ...           7 months ago
  • 0.1.0                                ...           7 months ago
  • 0.0.1                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (16)
Dependents (0)
None