Update: Ohli24 Queue fixes & Zendriver Daemon stability improvement

This commit is contained in:
2026-01-06 19:25:59 +09:00
parent 883b8d172b
commit 254a387cbd
12 changed files with 475 additions and 145 deletions

View File

@@ -209,11 +209,22 @@ async def fetch_with_browser(url: str, timeout: int = 30) -> Dict[str, Any]:
# browser.get(url)은 새 탭을 열거나 기존 탭을 사용함
page: Any = await browser.get(url)
# 페이지 로드 대기 (충분히 대기)
await asyncio.sleep(2.0)
# 페이지 로드 대기 - cdndania iframe 로딩될 때까지 폴링 (최대 15초)
max_wait = 15
poll_interval = 1
waited = 0
html_content = ""
while waited < max_wait:
await asyncio.sleep(poll_interval)
waited += poll_interval
html_content = await page.get_content()
# cdndania iframe이 로드되었는지 확인
if "cdndania" in html_content or "fireplayer" in html_content:
log_debug(f"[ZendriverDaemon] cdndania/fireplayer found after {waited}s")
break
# HTML 추출
html_content: str = await page.get_content()
elapsed: float = time.time() - start_time
if html_content and len(html_content) > 100:

View File

@@ -74,11 +74,21 @@ async def fetch_html(url: str, timeout: int = 60, browser_path: str = None) -> d
page = await browser.get(url)
# 페이지 로드 대기 (DOM 안정화)
await asyncio.sleep(2)
# 페이지 로드 대기 - cdndania iframe 로딩될 때까지 폴링 (최대 15초)
max_wait = 15
poll_interval = 1
waited = 0
html = ""
while waited < max_wait:
await asyncio.sleep(poll_interval)
waited += poll_interval
html = await page.get_content()
# cdndania iframe이 로드되었는지 확인
if "cdndania" in html or "fireplayer" in html:
break
# HTML 추출
html = await page.get_content()
elapsed = asyncio.get_event_loop().time() - start_time
if html and len(html) > 100: