dataabc / weiboSpider

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

'NoneType' object has no attribute 'xpath'报错 #543

Open astarrrr opened 11 months ago

astarrrr commented 11 months ago

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

答:github版

答:是

答:是

答:

答: "user_id_list": ["1699432410"], "filter": 1, "since_date": "2023-01-01", "end_date": "now", "random_wait_pages": [1, 3], "random_wait_seconds": [30, 40], "global_wait": [[1000, 3600], [500, 2000]],

答:'NoneType' object has no attribute 'xpath' Traceback (most recent call last): File "C:\Users\astar\PycharmProjects\pythonProject5\weiboSpider\weibo_spider\spider.py", line 179, in get_weibo_info weibos, self.weibo_id_list, to_continue = PageParser( File "C:\Users\astar\PycharmProjects\pythonProject5\weiboSpider\weibo_spider\parser\page_parser.py", line 47, in init info = self.selector.xpath("//div[@class='c']") AttributeError: 'NoneType' object has no attribute 'xpath' 共爬取130条原创微博

dataabc commented 11 months ago

感谢反馈。可能是速度太快了,建议降低速度,过段时间再运行。

astarrrr commented 11 months ago

感谢反馈。可能是速度太快了,建议降低速度,过段时间再运行 有没有建议的速度,还有除了改jason里的数值 还能怎么降低速度

dataabc commented 11 months ago

没有建议的速度,速度越慢越好,目前只能通过json设置。

shiverwang76 commented 10 months ago

我也遭遇了这个错误,并且在json里调慢速度之后,依然每次在同一个位置停止抓取

stale[bot] commented 6 months 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.

xiaoyequ04 commented 4 months ago

我也遇到同样的问题