Grabberjs
To grab web's information and send it to backends
Table of Contents
Install
This project uses node and npm. Go check them out if you don't have them locally installed.
$ npm install grabberjs
Then with a module bundler like rollup or webpack, use as you would anything else:
// using ES6 modules // using CommonJS modulesvar Grabber =
The UMD build is also available on unpkg:
You can find the library on window.Grabber
.
Usage
setup in your app
; const grab report = url: 'https://example.com'; // grab whatever you want; // report them in a perfect timing;
setup in your backend
// TODO:
API
grab
Grab data.
Parameters
-
key
required String Specific key for one data collection. -
data
required String | Number | Object data collection.
report
Report your data collections to backend.
Parameters
key
String Specific key for one data collection. If it is missing, Grabber will all your data collections to backend.
use
Install a plugin for your Grabber.
Parameters
plugin
Object todo
TODO
- simple as hell
- plugin system