Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
rss-worker是一个持久的可配的rss爬虫。支持多URL的并行爬取,并且会将所有条目按时间顺序进行保存,保存格式为"时间\n标题\n内容\n\n"
,支持的保存方式有fs与mongodb。
直接通过npm:
npm install rss-worker --save
源码:
git clone git@github.com:DavidCai1993/rss-worker.git
cd rss-worker && npm i && gulp #编译coffee的输出目录为./build
var RssWorker = require('rss-worker');
var opt = {
urls: ['https://cnodejs.org/rss', 'https://github.com/DavidCai1993.atom', 'http://segmentfault.com/feeds'],
store: {
type: 'fs',
dist: './store/rss.txt'
}
};
var rssWorker = new RssWorker(opt);
rssWorker.start();
一个抓取https://github.com/alsotang.atom
,https://cnodejs.org/rss
,http://segmentfault.com/feeds/blogs
内容24小时的输出(2015/5/6 19:30至2015/5/7 19:30 ,地址是随手挑的...←_←):这里
生成一个RssWorker的实例
options:
urls(Array)
- 必选,需要抓取的rss地址的数组store(Object)
- 存储方式,需要配置type
与dist
两属性
type
- 存储方式,可选fs
(默认)或mongodb
dist
- 存储结果的文件地址(将会自动创建),如:./store/rss.txt
(fs),mongodb://localhost:27017/rss_worker
(mongodb)timeout(Number)
- 每次抓取的间隔(秒),默认为60秒开始抓取
发出停止抓取信号,将不会继续抓取,但不会影响到正在进行的本次抓取。
FAQs
一个可配置的rss爬虫
The npm package rss-worker receives a total of 6 weekly downloads. As such, rss-worker popularity was classified as not popular.
We found that rss-worker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.