Git Product home page Git Product logo

weibo-crawler's People

Contributors

wenzhi-ding avatar yele97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

weibo-crawler's Issues

自动解析一组Cookies

现在需要用户自己拷贝SUB字段的值,不太方便。建议从程序端改为自动解析微博完整的Cookies,从中提取出SUB字段。

项目自动初始化

用脚本自动完成项目的初始化工作,包括创建空的各个输入文件以及建立数据库。

创建待爬MID表

生成一个仅包含待爬MID的posts表副本,用于拷贝至其他计算机做内容爬取。最好自动支持数据切片。

base62引用

  1. 直接设定 CHARSET 即可,不需要手动翻转
  2. 第三方库放入 util 下单独路径

自动更新 cookies

待研究微博刷新登录凭证 SUB 字段的方式,尝试引入自动更新 cookies 的机制

数据解析

目前具体微博数据以JSON格式存储在weibo.posts表中,计划提供一个简化的数据解析脚本方便普通用户使用。

README改进

  1. 增加关于 Python 版本的要求
  2. 增加关于获取 Cookie 的指引,及相关注意事项
  3. 删除 requirements.txt
  4. 更正“原生库”为“标准库”

整合项目

没有必要对微博项目的每个子爬虫设置一个单独的项目。准备将各个项目合并,子项目以模块的形式存在。

多进程爬取

尽管微博可能设置了单个IP的爬取频率上限,但使爬虫能够适应多进程仍然是有益的。

邮件提示报错

比如 Cookies 全部过期,或者其他错误。如果有邮件提醒会比较方便及时处理。

微信图片_20221011204905

Transform database to SQL

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.

增加对搜索页面的初步记录

对于数据质量要求不高的用户,可以直接使用搜索页面呈现的信息,而不需要再单独请求各条微博的具体数据

将下载微博内容与搜索爬虫模块解耦

目前两个模块是耦合的。可以设为一个模块专门从数据库中获取未完成的下载任务并下载JSON内容,另一个模块专门负责遍历搜索页面。这样可以纯下载或者纯搜索,能够提高搜索爬取的速度。

搜索进度的记录不佳

不应该以单一的时间区间记录搜索进度。可以考虑每次查询的三个时间点都写入库作为一条记录,这样可以实现对离散查询区间的支持,也方便做终止查询的判断(如果一个查询的区间已完全被包含,则不进行查询)。

爬取结果有漏

北陆药业,搜索2010-01-01-0到2016-04-27-10,在第49页以前结果都是2016年4月11日左右,但到第50页结果突然变成2015年7月,导致中间的结果漏查。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.