dataabc / weiboSpider

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

程序报错list index out of range #523

Closed MaoKate closed 1 year ago

MaoKate commented 1 year ago

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

答:github版

答:是

答:是

答:

答:

答: list index out of range Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\parser\index_parser.py", line 39, in get_user self.user.weibo_num = string_to_int(user_info[0][3:-1]) IndexError: list index out of range None


'NoneType' object has no attribute 'nickname' Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\spider.py", line 227, in _get_filepath dir_name = self.user.nickname AttributeError: 'NoneType' object has no attribute 'nickname' expected str, bytes or os.PathLike object, not NoneType Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\writer\csv_writer.py", line 26, in init newline='') as f: TypeError: expected str, bytes or os.PathLike object, not NoneType 'NoneType' object has no attribute 'nickname' Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\spider.py", line 227, in _get_filepath dir_name = self.user.nickname AttributeError: 'NoneType' object has no attribute 'nickname' 'NoneType' object has no attribute 'nickname' Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\spider.py", line 227, in _get_filepath dir_name = self.user.nickname AttributeError: 'NoneType' object has no attribute 'nickname' 'NoneType' object has no attribute 'nickname' Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\spider.py", line 227, in _get_filepath dir_name = self.user.nickname AttributeError: 'NoneType' object has no attribute 'nickname' 'NoneType' object has no attribute 'dict' Traceback (most recent call last): File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\spider.py", line 314, in get_one_user self.write_user(self.user) File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\spider.py", line 138, in write_user writer.write_user(user) File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\writer\txt_writer.py", line 29, in write_user [v + ':' + str(self.user.dict[k]) for k, v in self.user_desc]) File "C:\Users\kate\Downloads\weiboSpider-master\weibo_spider\writer\txt_writer.py", line 29, in [v + ':' + str(self.user.dict[k]) for k, v in self.user_desc]) AttributeError: 'NoneType' object has no attribute 'dict'

dataabc commented 1 year ago

应该是速度太快被暂时限制了,过一段时间再看看。

MaoKate commented 1 year ago

好的,我看看

BuxinZeng commented 1 year ago

请问解决了吗?

stale[bot] commented 1 year 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 1 year ago

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