This commit is contained in:
doms9 2025-09-30 17:36:59 -04:00
parent 5d78a68ac5
commit 00000d9bbd
2 changed files with 4 additions and 2 deletions

View file

@ -31,6 +31,7 @@ async def main() -> None:
asyncio.create_task(ppv.scrape(CLIENT)), asyncio.create_task(ppv.scrape(CLIENT)),
asyncio.create_task(streambtw.scrape(CLIENT)), asyncio.create_task(streambtw.scrape(CLIENT)),
asyncio.create_task(streameast.scrape(CLIENT)), asyncio.create_task(streameast.scrape(CLIENT)),
asyncio.create_task(streamed.scrape(CLIENT)),
asyncio.create_task(tvpass.scrape(CLIENT)), asyncio.create_task(tvpass.scrape(CLIENT)),
] ]

View file

@ -1,4 +1,5 @@
import asyncio import asyncio
import re
from datetime import datetime, timedelta from datetime import datetime, timedelta
from functools import partial from functools import partial
from pathlib import Path from pathlib import Path
@ -124,7 +125,7 @@ async def refresh_html_cache(client: httpx.AsyncClient, url: str) -> dict[str, s
onclick = hds_a.attributes.get("onclick", "") onclick = hds_a.attributes.get("onclick", "")
if not (chnl_id := "".join(s for s in onclick if s.isdigit())): if not (m := re.search(r"openPlayerPopup\(\s*(\d+)\s*\)", onclick)):
continue continue
key = f"[{sport}] {event} (STRMD)" key = f"[{sport}] {event} (STRMD)"
@ -132,7 +133,7 @@ async def refresh_html_cache(client: httpx.AsyncClient, url: str) -> dict[str, s
events[key] = { events[key] = {
"sport": sport, "sport": sport,
"event": event, "event": event,
"link": f"https://streamed.site/set.php?{chnl_id}", "link": f"https://streamed.site/set.php?{m[1]}",
"ts": event_dt.timestamp(), "ts": event_dt.timestamp(),
} }