Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,11 +6,11 @@ import urllib.parse
|
|
| 6 |
import asyncio
|
| 7 |
from typing import Dict, Optional
|
| 8 |
from itertools import cycle
|
| 9 |
-
|
| 10 |
# Install playwright if not present
|
| 11 |
-
if os.getenv("PLAYWRIGHT_INSTALL_RUN", "false").lower() != "true":
|
| 12 |
os.system("playwright install --with-deps")
|
| 13 |
-
os.environ["PLAYWRIGHT_INSTALL_RUN"] = "true"
|
| 14 |
|
| 15 |
from flask import Flask, request, jsonify
|
| 16 |
from bs4 import BeautifulSoup, NavigableString
|
|
|
|
| 6 |
import asyncio
|
| 7 |
from typing import Dict, Optional
|
| 8 |
from itertools import cycle
|
| 9 |
+
os.system("playwright install")
|
| 10 |
# Install playwright if not present
|
| 11 |
+
'''if os.getenv("PLAYWRIGHT_INSTALL_RUN", "false").lower() != "true":
|
| 12 |
os.system("playwright install --with-deps")
|
| 13 |
+
os.environ["PLAYWRIGHT_INSTALL_RUN"] = "true"'''
|
| 14 |
|
| 15 |
from flask import Flask, request, jsonify
|
| 16 |
from bs4 import BeautifulSoup, NavigableString
|