weibo-crawler icon indicating copy to clipboard operation
weibo-crawler copied to clipboard

list index out of range

Open JadePureOne opened this issue 3 years ago • 2 comments
trafficstars

list index out of range Traceback (most recent call last): File "D:\weibo-crawler\weibo.py", line 1606, in get_pages if (self.get_user_info() != 0): File "D:\weibo-crawler\weibo.py", line 335, in get_user_info self.user_to_database() File "D:\weibo-crawler\weibo.py", line 271, in user_to_database self.user_to_csv() File "D:\weibo-crawler\weibo.py", line 219, in user_to_csv self.last_weibo_date = last_weibo_msg.split(' ')[1] if last_weibo_msg else self.user_config['since_date'] IndexError: list index out of range

JadePureOne avatar Apr 25 '22 11:04 JadePureOne

加入cookie应该可以。

dataabc avatar Apr 25 '22 13:04 dataabc

self.last_weibo_date = last_weibo_msg.split(' ')[1]

将这里的1改为0,你再试试。

dididudu998 avatar May 17 '22 03:05 dididudu998