dataabc / weibo-crawler

新浪微博爬虫,用python爬取新浪微博数据,并下载微博图片和微博视频
3.49k stars 772 forks source link

list index out of range #292

Open JadePureOne opened 2 years ago

JadePureOne commented 2 years ago

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

dataabc commented 2 years ago

加入cookie应该可以。

dididudu998 commented 2 years ago

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

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