Browse Source

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

lierqiang 2 năm trước cách đây
mục cha
commit
367cd45042
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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')