Open tay10rb opened 1 year ago
数据爬取正常,在分析的过程中,报错如下:
[2023-02-28 20:54:29,371: ERROR/MainProcess] Task celery_task.worker.task_schedule[f252c77a-183e-4b50-ac0e-3f138b6b8d31] raised unexpected: KeyError('hot_count') Traceback (most recent call last): File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 240, in trace_task R = retval = fun(*args, kwargs) File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 438, in __protected_call__ return self.run(*args, *kwargs) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\worker.py", line 35, in task_schedule weibo_data, weibo_post_list, user_id_list = spider(tag, tag_task_id) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in spider result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True) KeyError: 'hot_count' [2023-02-28 20:54:29,373: ERROR/MainProcess] Task celery_task.worker.task_schedule[e7d16c18-b9ec-40bd-97d3-b573fad0f27c] raised unexpected: KeyError('hot_count') Traceback (most recent call last): File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 240, in trace_task R = retval = fun(args, kwargs) File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 438, in __protected_call__ return self.run(*args, **kwargs) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\worker.py", line 35, in task_schedule weibo_data, weibo_post_list, user_id_list = spider(tag, tag_task_id) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in spider result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True) KeyError: 'hot_count'
感谢您的反馈,我最近在忙复试和毕设的事情,可能需要等一段时间才能修复这个bug,给您带来的不便敬请谅解~
大佬这个项目还会更新吗,爬虫已经用不了了
您好,这个项目我会一直更新的,但是由于研一课业生活比较忙,更新可能比较慢,给您带来不便还请谅解
数据爬取正常,在分析的过程中,报错如下:
[2023-02-28 20:54:29,371: ERROR/MainProcess] Task celery_task.worker.task_schedule[f252c77a-183e-4b50-ac0e-3f138b6b8d31] raised unexpected: KeyError('hot_count') Traceback (most recent call last): File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 240, in trace_task R = retval = fun(*args, kwargs) File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 438, in __protected_call__ return self.run(*args, *kwargs) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\worker.py", line 35, in task_schedule weibo_data, weibo_post_list, user_id_list = spider(tag, tag_task_id) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in spider result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True) File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in
result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True)
KeyError: 'hot_count'
[2023-02-28 20:54:29,373: ERROR/MainProcess] Task celery_task.worker.task_schedule[e7d16c18-b9ec-40bd-97d3-b573fad0f27c] raised unexpected: KeyError('hot_count') args, kwargs)
File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 438, in __protected_call__
return self.run(*args, **kwargs)
File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\worker.py", line 35, in task_schedule
weibo_data, weibo_post_list, user_id_list = spider(tag, tag_task_id)
File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in spider
result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True)
File "G:\code\Topic_and_user_profile_analysis_system-master\code\back_end\celery_task\tag_task\tag_spider_task.py", line 52, in
result_data_list.sort(key=lambda x: int(x['hot_count']), reverse=True)
KeyError: 'hot_count'
Traceback (most recent call last): File "G:\Anaconda\envs\zs\lib\site-packages\celery\app\trace.py", line 240, in trace_task R = retval = fun(