Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

爬到第111条微博时自动停止程序 #636

Open
biejingaoguai opened this issue Feb 5, 2025 · 1 comment
Open

爬到第111条微博时自动停止程序 #636

biejingaoguai opened this issue Feb 5, 2025 · 1 comment
Labels
failed 程序运行出错

Comments

@biejingaoguai
Copy link

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

  • 问:请您指明哪个版本运行出错(github版/PyPi版/全部)?

答:GitHub

  • 问:您使用的是否是最新的程序(是/否)?

答:是

  • 问:爬取任意用户都会运行出错吗(是/否)?

答:否

  • 问:若只有爬特定微博时才出错,能否提供出错微博的weibo_id或url(非必填)?

答:

  • 问:若您已提供出错微博的weibo_id或url,可忽略此内容,否则能否提供出错账号的user_id及您配置的since_date,方便我们定位出错微博(非必填)?

答:

  • 问:如果方便,请您描述出错详情,最好附上错误提示。

答:C:\Users\AOOOOOOO\Desktop\weiboSpider-master\weiboSpider-master\weibo\华东扫地僧\video Progress: 1%|▉ | 11/832 [05:54<15:01:23, 65.88s/it]'NoneType' object has no attribute 'xpath' Traceback (most recent call last): File "C:\Users\AOOOOOOO\Desktop\weiboSpider-master\weiboSpider-master\weibo_spider\parser\page_parser.py", line 66, in get_one_page info = self.selector.xpath("//div[@Class='c']") ^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'xpath' Progress: 1%|▉ | 11/832 [05:55<7:22:01, 32.30s/it] cannot unpack non-iterable NoneType object Traceback (most recent call last): File "C:\Users\AOOOOOOO\Desktop\weiboSpider-master\weiboSpider-master\weibo_spider\spider.py", line 180, in get_weibo_info weibos, self.weibo_id_list, to_continue = PageParser( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: cannot unpack non-iterable NoneType object 共爬取111条原创微博 信息抓取完毕 ****************************************************************************************************

以上是报错,我不太明白是被封禁了还是html在这里结构发生了改变,但是我程序运行暂停的短时间内无法访问weibo,cn,所以我是否要增加随机等待时间?还是说要其他操作

@biejingaoguai biejingaoguai added the failed 程序运行出错 label Feb 5, 2025
@dataabc
Copy link
Owner

dataabc commented Feb 5, 2025

可能是暂时被禁,或者网络原因,因为程序就是访问的weibo.cn,您也可以使用免cookie版,看看它是否可以使用。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed 程序运行出错
Projects
None yet
Development

No branches or pull requests

2 participants