Spaces:
Sleeping
Sleeping
Tu Nombre commited on
Commit ·
eaf7f9c
1
Parent(s): 22498c9
Tester: domcontentloaded en vez de networkidle (Gradio nunca queda idle)
Browse files
app.py
CHANGED
|
@@ -65,8 +65,12 @@ def _abrir_y_capturar(url):
|
|
| 65 |
with sync_playwright() as p:
|
| 66 |
navegador = p.chromium.launch(args=["--no-sandbox", "--disable-dev-shm-usage"])
|
| 67 |
pagina = navegador.new_page(viewport={"width": 1280, "height": 1600})
|
| 68 |
-
pagina.goto(url, wait_until="
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
_interactuar(pagina)
|
| 71 |
pagina.wait_for_timeout(1000)
|
| 72 |
texto = pagina.inner_text("body")[:6000]
|
|
|
|
| 65 |
with sync_playwright() as p:
|
| 66 |
navegador = p.chromium.launch(args=["--no-sandbox", "--disable-dev-shm-usage"])
|
| 67 |
pagina = navegador.new_page(viewport={"width": 1280, "height": 1600})
|
| 68 |
+
pagina.goto(url, wait_until="domcontentloaded", timeout=45000)
|
| 69 |
+
try:
|
| 70 |
+
pagina.wait_for_selector(".gradio-container, gradio-app, #root", timeout=15000)
|
| 71 |
+
except Exception:
|
| 72 |
+
pass
|
| 73 |
+
pagina.wait_for_timeout(2500)
|
| 74 |
_interactuar(pagina)
|
| 75 |
pagina.wait_for_timeout(1000)
|
| 76 |
texto = pagina.inner_text("body")[:6000]
|