This commit is contained in:
zjf 2025-05-27 19:12:50 +08:00
parent b353ae81bb
commit e978751f92
1 changed files with 2 additions and 2 deletions

View File

@ -406,13 +406,13 @@ with rpa_image.imports():
live_status = None
logger.debug(f"Getting live status for webcast_id: {webcast_id}")
try:
await page.wait_for_selector("[class='pip-anchor']", timeout=60 * 000)
await page.wait_for_selector("[class='pip-anchor']", timeout=10 * 000)
await page.wait_for_function(
"""() => {
const element = document.querySelector('[class="pip-anchor"]');
return element && element.innerText !== "";
}""",
timeout=60 * 000
timeout=10 * 000
)
live_status_js = """document.querySelector('[class="pip-anchor"]')?.innerText || ''"""
live_status_text: str = await page.evaluate(live_status_js)