'commit'
This commit is contained in:
@@ -69,6 +69,17 @@ async def get_station_list(d, service, max_scrolls=MAX_SCROLLS):
|
||||
image_uuid = str(uuid.uuid4())
|
||||
screenshot_path = take_screenshot(d, image_uuid, save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
# 1.5 检查是否存在广告 (VL)
|
||||
logger.info("检查是否存在广告弹窗...")
|
||||
ad_res = await ReadImageKit.detect_ad_popup(screenshot_path, device_info=device_info)
|
||||
if ad_res:
|
||||
logger.info(f"检测到广告弹窗,准备关闭: {ad_res}")
|
||||
d.click(ad_res['x'], ad_res['y'])
|
||||
await asyncio.sleep(1.5)
|
||||
# 重新截图
|
||||
if os.path.exists(screenshot_path): os.remove(screenshot_path)
|
||||
screenshot_path = take_screenshot(d, image_uuid, save_dir=TEMP_IMAGE_DIR)
|
||||
|
||||
# 检查是否已经滚动到底部 (排除状态栏后,内容与上次一致)
|
||||
current_md5 = Kit.get_image_content_md5(
|
||||
screenshot_path,
|
||||
|
||||
Reference in New Issue
Block a user