轻型微博爬虫#
weibo_crawler参考【nghuyong/WeiboSpider】 对代码用法进行了简化,可以做轻度的微博数据采集。
用户信息抓取
用户微博抓取(全量/指定时间段)
用户社交关系抓取(粉丝/关注)
微博评论抓取
基于关键词和时间段(粒度到小时)的微博抓取
微博转发抓取
使用简介:https://www.douban.com/group/topic/247718378/
安装#
pip install weibo-crawler
Requirement already satisfied: weibo-crawler in /opt/anaconda3/lib/python3.7/site-packages (1.0)
Requirement already satisfied: pyquery in /opt/anaconda3/lib/python3.7/site-packages (from weibo-crawler) (1.4.3)
Requirement already satisfied: requests in /opt/anaconda3/lib/python3.7/site-packages (from weibo-crawler) (2.24.0)
Requirement already satisfied: cssselect>0.7.9 in /opt/anaconda3/lib/python3.7/site-packages (from pyquery->weibo-crawler) (1.1.0)
Requirement already satisfied: lxml>=2.1 in /opt/anaconda3/lib/python3.7/site-packages (from pyquery->weibo-crawler) (4.6.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/anaconda3/lib/python3.7/site-packages (from requests->weibo-crawler) (1.25.11)
Requirement already satisfied: idna<3,>=2.5 in /opt/anaconda3/lib/python3.7/site-packages (from requests->weibo-crawler) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in /opt/anaconda3/lib/python3.7/site-packages (from requests->weibo-crawler) (2019.11.28)
Requirement already satisfied: chardet<4,>=3.0.2 in /opt/anaconda3/lib/python3.7/site-packages (from requests->weibo-crawler) (3.0.4)
Note: you may need to restart the kernel to use updated packages.