This commit is contained in:
lalifeier
2025-03-15 17:28:34 +08:00
commit f9d687c39d
298 changed files with 161474 additions and 0 deletions

17
iptv/playwright.py Normal file
View File

@@ -0,0 +1,17 @@
import logging
from playwright.async_api import Playwright, async_playwright
logger = logging.getLogger(__name__)
playwright: Playwright = None
async def get_playwright():
global playwright
if playwright is None:
try:
playwright = await async_playwright().start()
except Exception as e:
logging.error(f"Error starting Playwright: {e}")
raise
return playwright