rpa
This commit is contained in:
parent
b353ae81bb
commit
e978751f92
|
|
@ -406,13 +406,13 @@ with rpa_image.imports():
|
||||||
live_status = None
|
live_status = None
|
||||||
logger.debug(f"Getting live status for webcast_id: {webcast_id}")
|
logger.debug(f"Getting live status for webcast_id: {webcast_id}")
|
||||||
try:
|
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(
|
await page.wait_for_function(
|
||||||
"""() => {
|
"""() => {
|
||||||
const element = document.querySelector('[class="pip-anchor"]');
|
const element = document.querySelector('[class="pip-anchor"]');
|
||||||
return element && element.innerText !== "";
|
return element && element.innerText !== "";
|
||||||
}""",
|
}""",
|
||||||
timeout=60 * 000
|
timeout=10 * 000
|
||||||
)
|
)
|
||||||
live_status_js = """document.querySelector('[class="pip-anchor"]')?.innerText || ''"""
|
live_status_js = """document.querySelector('[class="pip-anchor"]')?.innerText || ''"""
|
||||||
live_status_text: str = await page.evaluate(live_status_js)
|
live_status_text: str = await page.evaluate(live_status_js)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue