dataabc / weiboSpider

新浪微博爬虫,用python爬取新浪微博数据
8.37k stars 1.98k forks source link

weibo.cn 信息数少 #359

Closed wsymys closed 3 years ago

wsymys commented 3 years ago

为了更好的解决问题,请认真回答下面的问题。等到问题解决,请及时关闭本issue。

答:Github版

答:是

答:否

答:

答:

答: 抓取的微博信息数少了。抓取日期,2021年5月17~2021年7月28日,工具抓取结果和手工复制页面数据另用Excel公式统计结果比对,工具抓取结果少了若干条(条数分别为117 、178)。经过手工比对发现,同一个微博(钢都检察)的两个页面显示内容有差别。weibo.cn的页面里部分信息不显示。(比如7月25日的信息少了1条)。 https://weibo.cn/gangdujiancha?filter=0&rand=3708&p=r https://weibo.com/p/1001062769625793/home?from=page_100106&mod=TAB&is_all=1#place

dataabc commented 3 years ago

感谢反馈。

当end_date为非now值时,微博可能会不全。如果想获取某一段时间的微博,建议先八end_date设为now,since_date设为较早的日期值(如上面的2021-05-17),然后修改spider.py的get_weibo_info方法

    def get_weibo_info(self):
                ......
                for page in tqdm(range(1, page_num + 1), desc='Progress'):
                ......

把第一个数字1改成发布日期为较新日期(如上面的2021年7月28日)微博所在的页数,如果该日期没有发布微博,就选发布日期最接近它且早于它的页码。

如果还有疑问,欢迎继续讨论。

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

Closing as stale, please reopen if you'd like to work on this further.