This commit is contained in:
HuangHai
2026-01-12 22:35:34 +08:00
parent 66c0046d2b
commit 7f109b9dbc
7 changed files with 34 additions and 6 deletions

View File

@@ -70,9 +70,13 @@ async def check_and_close_ad(d):
logger.info(f"VL 检测完成,未发现已知广告。")
# 清理本地截图
# 如果未检测到广告,保留截图以便调试(保存为 debug_ad_failure.jpg)
debug_path = os.path.join(os.path.dirname(screenshot_path), "debug_ad_failure.jpg")
if os.path.exists(debug_path):
os.remove(debug_path)
if os.path.exists(screenshot_path):
os.remove(screenshot_path)
os.rename(screenshot_path, debug_path)
logger.info(f"未检测到广告,截图已保存至: {debug_path} (请检查该图片是否真的包含广告)")
return False