Explorar o código

update 西瓜搜索改为时间排序搜索

lierqiang %!s(int64=2) %!d(string=hai) anos
pai
achega
367cd45042
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      xigua/xigua_search/xigua_search.py

+ 1 - 1
xigua/xigua_search/xigua_search.py

@@ -654,7 +654,7 @@ class XiguaSearch:
             for video_info in search_list:
                 v_type = video_info['type']
                 rule_dict = cls.get_rule(log_type, crawler)
-                publish_time = video_info['publish_time']
+                publish_time = video_info['data']['publish_time']
                 old_time = int(time.time()) - (3600 * 24 * rule_dict['publish_time'])
                 if publish_time <= old_time:
                     Common.logger(log_type, crawler).error(f'关键词:{search_word},抓取完毕,退出抓取\n')