e
This commit is contained in:
parent
5d78a68ac5
commit
00000d9bbd
2 changed files with 4 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import re
|
||||
from datetime import datetime, timedelta
|
||||
from functools import partial
|
||||
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", "")
|
||||
|
||||
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
|
||||
|
||||
key = f"[{sport}] {event} (STRMD)"
|
||||
|
|
@ -132,7 +133,7 @@ async def refresh_html_cache(client: httpx.AsyncClient, url: str) -> dict[str, s
|
|||
events[key] = {
|
||||
"sport": sport,
|
||||
"event": event,
|
||||
"link": f"https://streamed.site/set.php?{chnl_id}",
|
||||
"link": f"https://streamed.site/set.php?{m[1]}",
|
||||
"ts": event_dt.timestamp(),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue