fix: Enhanced Zendriver Docker compatibility with additional browser flags
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
title: "애니 다운로더"
|
title: "애니 다운로더"
|
||||||
version: "0.5.8"
|
version: "0.5.9"
|
||||||
package_name: "anime_downloader"
|
package_name: "anime_downloader"
|
||||||
developer: "projectdx"
|
developer: "projectdx"
|
||||||
description: "anime downloader"
|
description: "anime downloader"
|
||||||
|
|||||||
@@ -157,12 +157,23 @@ async def ensure_browser() -> Any:
|
|||||||
|
|
||||||
# 실행 가능한 브라우저 찾기
|
# 실행 가능한 브라우저 찾기
|
||||||
exec_path = find_browser_executable()
|
exec_path = find_browser_executable()
|
||||||
|
log_debug(f"[ZendriverDaemon] Startup params: headless=True, no_sandbox=True, path={exec_path}")
|
||||||
|
|
||||||
if exec_path:
|
if exec_path:
|
||||||
log_debug(f"[ZendriverDaemon] Found browser at: {exec_path}")
|
log_debug(f"[ZendriverDaemon] Starting browser at: {exec_path}")
|
||||||
browser = await zd.start(headless=True, browser_executable_path=exec_path)
|
browser = await zd.start(
|
||||||
|
headless=True,
|
||||||
|
browser_executable_path=exec_path,
|
||||||
|
no_sandbox=True,
|
||||||
|
browser_args=["--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
log_debug("[ZendriverDaemon] No explicit browser path found, trying default")
|
log_debug("[ZendriverDaemon] Starting browser with default path")
|
||||||
browser = await zd.start(headless=True)
|
browser = await zd.start(
|
||||||
|
headless=True,
|
||||||
|
no_sandbox=True,
|
||||||
|
browser_args=["--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
|
||||||
|
)
|
||||||
|
|
||||||
log_debug("[ZendriverDaemon] Browser started successfully")
|
log_debug("[ZendriverDaemon] Browser started successfully")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -59,9 +59,18 @@ async def fetch_html(url: str, timeout: int = 60, browser_path: str = None) -> d
|
|||||||
|
|
||||||
# 브라우저 시작
|
# 브라우저 시작
|
||||||
if exec_path:
|
if exec_path:
|
||||||
browser = await zd.start(headless=True, browser_executable_path=exec_path, no_sandbox=True)
|
browser = await zd.start(
|
||||||
|
headless=True,
|
||||||
|
browser_executable_path=exec_path,
|
||||||
|
no_sandbox=True,
|
||||||
|
browser_args=["--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
browser = await zd.start(headless=True, no_sandbox=True)
|
browser = await zd.start(
|
||||||
|
headless=True,
|
||||||
|
no_sandbox=True,
|
||||||
|
browser_args=["--disable-dev-shm-usage", "--disable-gpu", "--no-first-run"]
|
||||||
|
)
|
||||||
|
|
||||||
page = await browser.get(url)
|
page = await browser.get(url)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user