This commit is contained in:
HuangHai
2026-01-16 19:30:31 +08:00
parent c7cf0db77e
commit 78f116ab84
12 changed files with 22 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
# 采集配置
SCROLL_DISTANCE_RATIO = 0.3
MAX_STATIONS_COUNT = 20
MAX_STATIONS_COUNT = 1
FIRST_RUN_ONLY_ONE_STATION = False
REDIS_STATION_EXPIRE = 120

View File

@@ -409,14 +409,14 @@ class TeLaiDianCrawler(BaseCrawler):
await asyncio.sleep(1.0)
# 1. 向上滚动到顶部(不断下拉直到看到最上面的 00:00)
logger.info("正在向上滚动价格列表到顶部...")
max_scroll_up_to_top = 8
logger.info("正在向上滚动价格列表到顶部 (快速多次滚动以尽快看到 00:00)...")
max_scroll_up_to_top = 10
for i in range(max_scroll_up_to_top):
before_scroll_path = take_screenshot(d, f"scroll_up_{i}.jpg")
before_scroll_md5 = get_image_content_md5(before_scroll_path)
d.swipe_ext("down", scale=0.85)
await asyncio.sleep(1.5)
await asyncio.sleep(0.5)
after_scroll_path = take_screenshot(d, f"scroll_up_after_{i}.jpg")
after_scroll_md5 = get_image_content_md5(after_scroll_path)