Package Exports
- web-moocher
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 (web-moocher) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
web-moocher
Web page data mooch
Usage
for Table
const Mooch = require('web-moocher');
const mooch = new Mooch({
slug: 'example',
url: 'www.example.com',
});
mooch.getTable({
selector: '#table-id',
fields: {
count: 3, // if you dont want all field, you must define column.length
sort: ['Name', 'Surname'], // fields what you want
limit: 10,
skip: 3,
},
}).then((res) => {
// ... Response (res is typeof Json Object)
console.log(res);
}).catch((err) => {
// ... Error
});
for Table with using Cron
mooch.getTablewithCron({
selector: '#puantablosu',
cron: {
cronTime: '* * * * * *', // cron time
onTick: (data) => {
// process that every tick
console.log(data);
},
start: true, // default false
timeZone: 'America/Los_Angeles', // default Europe/Istanbul
},
fields: {
count: 3, // if you dont want all field, you must define column.length
sort: ['Name', 'Surname'], // fields what you want
limit: 10,
skip: 3,
},
}); // you can set 'start:true' or .start() at this statement