This commit is contained in:
zjf 2025-05-29 17:36:14 +08:00
parent 3214d3d902
commit c8502a7408
1 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@ rpa_image = (modal.Image.debian_slim(python_version="3.11")
"mkdir /root/browsers", "mkdir /root/browsers",
"playwright install-deps", "playwright install-deps",
"playwright install chromium", "playwright install chromium",
"playwright install webkit",
"playwright install --force msedge", "playwright install --force msedge",
]) ])
.add_local_python_source('cluster') .add_local_python_source('cluster')
@ -348,7 +349,7 @@ async def do_explaining(current_product_id, current_product_img, current_product
return current_product_id, current_product_img, current_product_name, last_live_time, start_time return current_product_id, current_product_img, current_product_name, last_live_time, start_time
async def refresh_page(page:Page): async def refresh_page(page: Page):
try: try:
# await page.reload(timeout=60000) # await page.reload(timeout=60000)
# await page.wait_for_load_state("networkidle", timeout=60000) # await page.wait_for_load_state("networkidle", timeout=60000)
@ -520,7 +521,8 @@ with (rpa_image.imports()):
return data_res return data_res
async with async_playwright() as p: async with async_playwright() as p:
browser: Browser = await p.chromium.launch(headless=False, channel='msedge') # browser: Browser = await p.chromium.launch(headless=False, channel='msedge')
browser: Browser = await p.webkit.launch()
# browser = await p.chromium.launch(channel="msedge") # browser = await p.chromium.launch(channel="msedge")
result = await goto_live(browser, data, result, webcast_id) result = await goto_live(browser, data, result, webcast_id)