大佬好,请问一下我在将用户的数据爬取下来保存到Mysql以后,怎么运行Data_analysis.py文件会出现
Traceback (most recent call last):
File "E:/python/python项目/Spider-master/weibo/data_analysis/Data_analysis.py", line 150, in
main(uid)#指定需要分析的用户的uid(必须先存在conf.yaml里面,并且运行了一次sina_spider程序),默认为conf.yaml中的第一条uid
File "E:/python/python项目/Spider-master/weibo/data_analysis/Data_analysis.py", line 135, in main
plot_create_time(time_lists)
File "E:/python/python项目/Spider-master/weibo/data_analysis/Data_analysis.py", line 117, in plot_create_time
long_lists.append(res[0])
IndexError: list index out of range
尝试打印了一下res,发现确实是空的,请问一下怎么解决
大佬好,请问一下我在将用户的数据爬取下来保存到Mysql以后,怎么运行Data_analysis.py文件会出现 Traceback (most recent call last): File "E:/python/python项目/Spider-master/weibo/data_analysis/Data_analysis.py", line 150, in
main(uid)#指定需要分析的用户的uid(必须先存在conf.yaml里面,并且运行了一次sina_spider程序),默认为conf.yaml中的第一条uid
File "E:/python/python项目/Spider-master/weibo/data_analysis/Data_analysis.py", line 135, in main
plot_create_time(time_lists)
File "E:/python/python项目/Spider-master/weibo/data_analysis/Data_analysis.py", line 117, in plot_create_time
long_lists.append(res[0])
IndexError: list index out of range
尝试打印了一下res,发现确实是空的,请问一下怎么解决