wenzhi-ding / weibo-crawler Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
#6 整合项目后,应使得各个模块内的脚本可以调用根目录的数据库。
目前两个模块是耦合的。可以设为一个模块专门从数据库中获取未完成的下载任务并下载JSON内容,另一个模块专门负责遍历搜索页面。这样可以纯下载或者纯搜索,能够提高搜索爬取的速度。
北陆药业,搜索2010-01-01-0到2016-04-27-10,在第49页以前结果都是2016年4月11日左右,但到第50页结果突然变成2015年7月,导致中间的结果漏查。
可以从 git clone
开始,或者从安装 Python 开始。展示基本功能的完整使用流程。
原因暂未明
不应该以单一的时间区间记录搜索进度。可以考虑每次查询的三个时间点都写入库作为一条记录,这样可以实现对离散查询区间的支持,也方便做终止查询的判断(如果一个查询的区间已完全被包含,则不进行查询)。
搜索进度记录需要定期整合
目前用户页面爬虫仍以单独的形式存在,等待整合到当前框架。
没有必要对微博项目的每个子爬虫设置一个单独的项目。准备将各个项目合并,子项目以模块的形式存在。
以日志文件的形式捕获过程中产生的输出有利于检查问题。
现在需要用户自己拷贝SUB字段的值,不太方便。建议从程序端改为自动解析微博完整的Cookies,从中提取出SUB字段。
生成一个仅包含待爬MID的posts表副本,用于拷贝至其他计算机做内容爬取。最好自动支持数据切片。
CHARSET
即可,不需要手动翻转util
下单独路径在多台计算机完成后的数据需要用脚本自动合并起来。
用脚本自动完成项目的初始化工作,包括创建空的各个输入文件以及建立数据库。
可以按照关键词分别建立文件夹,里面是单独的sheet,方便分工处理
增加一个报告模块,可以定期通过邮件报告爬取进展。
尽管微博可能设置了单个IP的爬取频率上限,但使爬虫能够适应多进程仍然是有益的。
目前具体微博数据以JSON格式存储在weibo.posts
表中,计划提供一个简化的数据解析脚本方便普通用户使用。
requirements.txt
Currently, all JSON files are stored separately. Therefore, it's not convenient for task management. This project will transform into an SQLite database and add support for PostgreSQL to align with other Weibo Crawler projects of mine.
对于数据质量要求不高的用户,可以直接使用搜索页面呈现的信息,而不需要再单独请求各条微博的具体数据
待研究微博刷新登录凭证 SUB 字段的方式,尝试引入自动更新 cookies 的机制
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.