'commit'
This commit is contained in:
@@ -57,17 +57,23 @@ async def get_station_list(d, service, max_scrolls=MAX_SCROLLS):
|
||||
|
||||
# 用于追踪后台分析任务
|
||||
background_tasks = []
|
||||
last_list_md5 = None
|
||||
|
||||
for i in range(max_scrolls + 1):
|
||||
logger.info(f"正在处理第 {i + 1} 页...")
|
||||
# ... (前序步骤保持不变)
|
||||
|
||||
# (在此处截断,以便后续替换循环体内的逻辑)
|
||||
|
||||
|
||||
# 1. 拍摄截图
|
||||
image_uuid = str(uuid.uuid4())
|
||||
screenshot_path = take_screenshot(d, image_uuid, save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
# 检查是否已经滚动到底部 (截图内容与上次一致)
|
||||
current_md5 = Kit.get_file_md5(screenshot_path)
|
||||
if last_list_md5 and current_md5 == last_list_md5:
|
||||
logger.info("检测到列表截图内容无变化,已到达底部或加载完成,提前结束。")
|
||||
if os.path.exists(screenshot_path): os.remove(screenshot_path)
|
||||
break
|
||||
last_list_md5 = current_md5
|
||||
|
||||
logger.info(f"列表页截图已完成: {screenshot_path}")
|
||||
|
||||
# 2. 执行图形学分析,生成 _flag.jpg, _vl.jpg 和 .json
|
||||
|
||||
Reference in New Issue
Block a user