大家好,这里是程序员晚枫,正在all in AI编程实战,今天给大家分享一个爬取微博的项目。

使用的框架

只用了一个框架:Scrapy

教程:https://www.bilibili.com/video/BV1LV411m7Ym

实现的功能

  • 用户信息采集
1
2
cd weibospider
python run_spider.py user
  • 用户粉丝列表采集
1
python run_spider.py fan
  • 用户关注列表采集
1
python run_spider.py follow
  • 用户的微博采集
1
python run_spider.py tweet
  • 微博评论采集
1
python run_spider.py comment
  • 微博转发采集
1
python run_spider.py repost
  • 基于关键词的微博检索
1
python run_spider.py search

注意事项

运行之前,改一下自己的cookie。


             

相关阅读

🎓 AI 编程实战课程

程序员晚枫专注AI编程培训,通过 《30讲 · AI编程训练营》,让小白也能用AI做出实际项目。帮你从零上手!