Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidfoliveira/node-jscrap
A very easy-to-use web scrapper
https://github.com/davidfoliveira/node-jscrap
Last synced: 7 days ago
JSON representation
A very easy-to-use web scrapper
- Host: GitHub
- URL: https://github.com/davidfoliveira/node-jscrap
- Owner: davidfoliveira
- Created: 2014-03-31T14:48:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-03-09T13:06:06.000Z (over 5 years ago)
- Last Synced: 2024-10-04T16:16:06.094Z (about 1 month ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jscrap: A very easy-to-use and lighweight web scrapper
`jscrap` is a very fast and easy-to-use web scrapper for node.js
# Installing
npm install jscrap
# Having fun
var
jscrap = require('jscrap');jscrap.scrap("https://www.kernel.org/",function(err,$){
console.log("Latest Linux Kernel: ",$("article #latest_link > a").text().trim());
console.log("Released: ",$("article #releases tr:first-child td:nth-child(3)").text());
});# Supported selectors:
`jscrap` supports all the [zcsel](https://www.npmjs.org/package/zcsel) selectors and functions.
Watch out [zcsel](https://www.npmjs.org/package/zcsel) documentation.# Options
The `scrap()` function supports these options:
`debug` : Activates the debug mode. Defaults to `false`.
`followRedirects` : Number of redirects to follow. Defaults to `3`.
`charsetEncoding` : Document charset. Default to `utf-8`.