fastagency

1.0.2 • Public • Published

FastAgency

简介

一个爬取IP代理地址的小模块,使用了crawler。

使用方法

const fa = require('fastagency');

//爬取5页IP,间隔为2000毫秒,返回JSON,并保存到本地
fa.update(5,(ips)=>{
		console.log(ips);
	}
,2000); 

//读取本地JSON
fa.getAgency(null,(ips,filePath)=>{
  console.log(filePath);
  console.log(ips);
});

注意事项

  • 爬取间隔不要太短,会导致爬取不到数据。
  • 爬取的数据已经保存在本地,更新IP需要比较长的时间

Readme

Keywords

none

Package Sidebar

Install

npm i fastagency

Weekly Downloads

2

Version

1.0.2

License

MIT

Unpacked Size

25.4 kB

Total Files

11

Last publish

Collaborators

  • heilosrobin