v0.6.18: Fix StopIteration error on repeated requests - Reset tab to about:blank instead of closing - Zendriver requires at least 1 tab to remain open - Prevents coroutine raised StopIteration error
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
title: "애니 다운로더"
|
title: "애니 다운로더"
|
||||||
version: "0.6.17"
|
version: "0.6.18"
|
||||||
package_name: "anime_downloader"
|
package_name: "anime_downloader"
|
||||||
developer: "projectdx"
|
developer: "projectdx"
|
||||||
description: "anime downloader"
|
description: "anime downloader"
|
||||||
|
|||||||
@@ -359,12 +359,12 @@ async def fetch_with_browser(url: str, timeout: int = 30) -> Dict[str, Any]:
|
|||||||
result["elapsed"] = round(total_elapsed, 2)
|
result["elapsed"] = round(total_elapsed, 2)
|
||||||
log_debug(f"[ZendriverDaemon] Fetch failure: Short response ({len(html_content) if html_content else 0} bytes)")
|
log_debug(f"[ZendriverDaemon] Fetch failure: Short response ({len(html_content) if html_content else 0} bytes)")
|
||||||
|
|
||||||
# 탭 정리 (중요! 탭 누적 방지)
|
# 탭 정리: 닫지 말고 about:blank로 리셋 (최소 1개 탭 유지 필요)
|
||||||
if page:
|
if page:
|
||||||
try:
|
try:
|
||||||
await page.close()
|
await page.get("about:blank")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log_debug(f"[ZendriverDaemon] Tab close failed: {e}")
|
log_debug(f"[ZendriverDaemon] Tab reset failed: {e}")
|
||||||
|
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
log_debug("[ZendriverDaemon] StopIteration caught during browser.get, resetting browser")
|
log_debug("[ZendriverDaemon] StopIteration caught during browser.get, resetting browser")
|
||||||
|
|||||||
Reference in New Issue
Block a user