codesofun / web-bee Goto Github PK
View Code? Open in Web Editor NEW🐝 Web vertical crawler framework for fun
License: MIT License
🐝 Web vertical crawler framework for fun
License: MIT License
需要增加针对用户的JSON格式返回类型
需要增加封装request
的header
请求,并且可以让用户配置post
,get
,put
,delete
等请求方式
目前支持服务器回调的nextUrl
对于没有回调的需要完善处理进行自动获取
并且getNextUrl("key")处理的不好需要修改
org.apache.http.conn.ConnectTimeoutException: Connect to www.zhihu.com:443 [www.zhihu.com/118.178.213.186] failed: connect timed out
httpclient
使用中生成的请求应该限定超时时间,不能让线程一直等待状态!
需要完成 Content-Type 转 extension 自动匹配生成文件
已完成httpClient封装get post put 请求,但是不够优雅,需要简化代码
爬取过程中抛异常 eg:404 、 timeout、需要进行处理重新爬取3次机会再失败进行标记缓存java或持久化中间件中
有些难点:
js引擎渲染bind-dom无法直接拿到精确url
滚动加载下一页
api返回html并非json
日志规范
用户不需要自己处理elements元素,最好自己实现
让用户有更加好的体验
爬取视频,并写一个慕课网视频爬取demo
初步打算使用echarts
图表 对知乎用户:
xxx最xxx
的文章将webBee选择器进一步扩展和优化,基本达到jquery的目的,降低学习成本
增加良好的处理异常措施,让用户一目了然,并防止程序宕机
发布到maven**仓库
讨论请求出带抓取文件队列后的下载问题。
如何处理单页面爬虫?
应该多使用java8语言优势
增加爬取图片接口
wget -r -p -np -k http
功能实现
不依靠中间件实现java底层缓存api或选择器返回抓取数据,进行缓存,顺便进行学习
需要解决 travis CI 持续集成 报1.6不支持的bug
场景 :抛出多个异常1.6不支持
下载后,导入eclipse:
很多jar报错呢。
luence,全局搜索都没有。
项目是怎么依赖关系?
对于一些反爬不错的网站 典型:知乎
应该特别注意模仿用户行为,应该增加定时器每天分三个时段进行智能爬取
爬取知乎百万数据为防止爬取重复用户以及生成关系策略需要进行缓存
java缓存百万数据不切实际额,需要开发webbee-redis插件
提供一个爬取图片的例子,批量爬取
@wangtonghe 为下载文件实现多线程,需要技术支持
如何使用?有没相应文档?
实现类似 Jquery
的 $
选择器 抓取需要爬的数据
//todo page.getJson/html/string().$('textarea.content').as('content').bulid().$('#img').as('img')
//todo 期望结果: {content:[],img:[]} 一条{}多条[] 的json格式
//todo page.nextUrl('span>ss>s')
//todo 直接获取api接口
提供一个不需要用户传入Task的API,方便下载单个视频 例如: 今日头条
昵图网
等。增加自由度,甚至抽离出:输入url自动下载视频的app
合理利用工厂模式,减少代码重复率
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.