news-grabber
v1.1.0
Published
Keep you posted for any updated news from web pages.
Readme
Install
npm install -g news-grabberConfig
Create a file in current directory called news-grabberc.json
to contain the configurations, for example:
{
"timing": "00 00 07 * * *",
"timezone": "Asia/Shanghai",
"pages": [{
"title": "A Financial Report",
"url": "http://example.com",
"selector": "section table.financial-list",
"mail": {
"receivers": ["[email protected]"]
}
}],
"nodemailer": {
"service": "126",
"from": "[email protected]",
"auth": {
"user": "[email protected]",
"pass": "your password"
}
}
}Usage
Plain:
news-grabberUse pm2:
pm2 start `which news-grabber` --name 'news-grabber' --log-date-format 'DD-MM HH:mm:ss.SSS'API
timing: Cron syntax, see: https://github.com/kelektiv/node-crontimezone: The timezone config for node-cronpages.title: The title of your page, used by email titlepages.url: The url of the webpage to be watchedselector: The DOM selector conforming todocument.querySelectorAll()mail.receivers: The mail receivers to send mail to once update foundnodemailer: The config for nodemailer
