From c8502a7408678265c4af0640a870834a59cb511b Mon Sep 17 00:00:00 2001 From: zjf Date: Thu, 29 May 2025 17:36:14 +0800 Subject: [PATCH] rpa m --- src/cluster/rpa.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cluster/rpa.py b/src/cluster/rpa.py index 1a7fb5c..0c0ed5b 100644 --- a/src/cluster/rpa.py +++ b/src/cluster/rpa.py @@ -28,6 +28,7 @@ rpa_image = (modal.Image.debian_slim(python_version="3.11") "mkdir /root/browsers", "playwright install-deps", "playwright install chromium", + "playwright install webkit", "playwright install --force msedge", ]) .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 -async def refresh_page(page:Page): +async def refresh_page(page: Page): try: # await page.reload(timeout=60000) # await page.wait_for_load_state("networkidle", timeout=60000) @@ -520,7 +521,8 @@ with (rpa_image.imports()): return data_res 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") result = await goto_live(browser, data, result, webcast_id)