jwlyn / jscrapy Goto Github PK
View Code? Open in Web Editor NEWThe world's leading data crawler platform!
The world's leading data crawler platform!
RT
重构
RT
配置有点多,每个模块的配置都混合在一起。
希望可以形成层次关系、组关系。
不同任务的日志分别打在不同的文件里。这样是为了将来在web控制台上可以单独看某一个任务的log
RT
当出现超时等网络错误的时候,放回队列等待重试。
RT。例如
arrayList = [];
for(i=0; i<1000; i++){
arrayList.add("http://xxx.com?page="+i);
}
在程序运行之初调用这个方法把种子初始化进入到队列里。
RT
实现一个命令行客户端,云端部署了集群成为一种基础设施。将配置和jar打包到一起,然后从客户端可以直接执行,指明存储位置。
实现对header, cookie, referer, isAjax的操作
在一些大型商业网站,例如求职、商品房销售、外卖站点的抓取过程中。有些房子卖出去了,于是页面就不存在了。
这个时候应该有个机制直接根据返回的
爬虫节点能够从网络接受任务并抓取。
下载接口实现
RT
删除ehcache,放入ext module?
目前VIRTUAL_ID使用的是JVM进程号。但是这个进程号每次重启之后都会变化。
如果使用ehcache作为去重,bigqueue作为队列,那么再次启动jvm进程会发生变化,任务不能断点继续。
使用slfapi打印日志
如果ajax带有时间因子,例如2秒超时。那么这ajax在迭代的时候插入到队列末尾,最终被拿出来处理的时候就会出现失效。
生成网页的MD5保存为文件,找不到文件的原始出处。
如果出了问题也不容易查,因此使用html注释的方式将请求信息保存在网页文本中。
例如抓whois信息。以域名为输入参数,但是每个站点的whois接口不一样。要抓的字段信息一样。
RT
需要反复尝试,长时间尝试的站点。
以yaml文件为命令行输入跑一个爬虫
RT使用jodd-http代替
RT
打包成可执行war包
RT
基于Mongodb的可靠抓取queue
菜鸟模式只配置几个xpath或者正则等。
专家模式可以写脚本。
可以从网页里把复杂的js函数扣出来,执行客户端的复杂计算
RT
标准配置模版
用jetty代替
实现下载模块
用于动态注入爬虫中变化部分。
思路:将jar包发布到nexus上,动态装卸。
RT
RT
RT
去掉换行,空白。
RT
如果跑的过程中域名发生了更换,但是又要原来的缓存接着跑。去重方法需要改进。
如题。
RT
例如
自实现
RT
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.