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

@@ -318,14 +318,14 @@ async def get_station_list(d, service, uploader, max_stations_count=MAX_STATIONS
price_screenshots = []
# 1. 向下滚动到底 (根据用户反馈:只有不断向下滚动,才能看到00点的)
logger.info("正在向下滚动价格列表到底部...")
max_scroll_down = 6
logger.info("正在向下滚动价格列表到底部 (快速多次滚动以尽快看到 00:00)...")
max_scroll_down = 10
for i in range(max_scroll_down):
before_scroll_path = take_screenshot(d, f"scroll_dn_{i}", save_dir=TEMP_IMAGE_DIR)
before_scroll_md5 = Kit.get_image_content_md5(before_scroll_path)
d.swipe_ext("up", scale=0.8)
await asyncio.sleep(1.2)
await asyncio.sleep(0.5)
after_scroll_path = take_screenshot(d, f"scroll_dn_after_{i}", save_dir=TEMP_IMAGE_DIR)
after_scroll_md5 = Kit.get_image_content_md5(after_scroll_path)
@@ -340,7 +340,7 @@ async def get_station_list(d, service, uploader, max_stations_count=MAX_STATIONS
# 2. 向上滚动并逐页截图 (从底向上抓取)
logger.info("正在向上滚动价格列表并逐页截图...")
max_scroll_up = 8
max_scroll_up = 10
for p_idx in range(1, max_scroll_up + 1):
# 截图当前页
p_uuid = f"{hashlib.md5(station_name.encode('utf-8')).hexdigest()}_p_{p_idx}"
@@ -349,8 +349,8 @@ async def get_station_list(d, service, uploader, max_stations_count=MAX_STATIONS
# 检查是否还能向上滚动
before_up_md5 = Kit.get_image_content_md5(p_path)
d.swipe_ext("down", scale=0.85) # 向上滚动 = 手势向下
await asyncio.sleep(1.5)
d.swipe_ext("down", scale=0.85)
await asyncio.sleep(0.5)
# 检查是否还有新内容
check_up_path = take_screenshot(d, f"check_up_{p_idx}", save_dir=TEMP_IMAGE_DIR)