From b5384f8bcde8acdfdf9d42c868446228f72ea182 Mon Sep 17 00:00:00 2001 From: DELL Date: Thu, 26 Feb 2026 16:17:48 +0800 Subject: [PATCH] =?UTF-8?q?[baidu]=20=E7=99=BE=E5=BA=A6=E7=83=AD=E6=90=9C?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=87=87=E9=9B=86=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MediaSpiders/MediaSpiders/spiders/BaiduHotSearchSprder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spiders/MediaSpiders/MediaSpiders/spiders/BaiduHotSearchSprder.py b/spiders/MediaSpiders/MediaSpiders/spiders/BaiduHotSearchSprder.py index 87733a3..ba794e3 100644 --- a/spiders/MediaSpiders/MediaSpiders/spiders/BaiduHotSearchSprder.py +++ b/spiders/MediaSpiders/MediaSpiders/spiders/BaiduHotSearchSprder.py @@ -293,7 +293,7 @@ class BaiduHotSearchSprder(scrapy.Spider): hkey = get_str_md5(title) # 排名(默认使用当前收集序号) - rank = str(self.collected_items + 1) + rank = str(self.collected_items) rank_elem = find_visible_element(RANK_SELECTORS) if rank_elem: extracted_rank = clean_text(rank_elem.text) @@ -359,6 +359,7 @@ class BaiduHotSearchSprder(scrapy.Spider): hot_search_item['es_carriertype'] = carrier_type hot_search_item['es_urltime'] = get_current_timestamp() hot_search_item['es_lasttime'] = get_current_timestamp() + hot_search_item['es_loadtime'] = get_current_timestamp() hot_search_item['es_hkey'] = hkey hot_search_item['es_simrank'] = rank hot_search_item['es_heat'] = heat