e
This commit is contained in:
parent
c2aa25a654
commit
00000d934a
12 changed files with 231 additions and 68 deletions
|
|
@ -38,6 +38,8 @@ CERT_FILE = Path(__file__).parent / "utils" / "cached-ca.pem"
|
|||
|
||||
CACHE_FILE = Path(__file__).parent / "caches" / "livetvsx.json"
|
||||
|
||||
exist_sprts = set(LOGOS.keys())
|
||||
|
||||
|
||||
async def write_to_cert(
|
||||
client: httpx.AsyncClient,
|
||||
|
|
@ -248,9 +250,13 @@ async def get_events(
|
|||
else ("", "")
|
||||
)
|
||||
|
||||
key = f"[{sport}: {event}] {title}"
|
||||
key = f"[{sport}: {event}] {title} (LTVSX)"
|
||||
|
||||
if key in cached_keys:
|
||||
if cached_keys & {key}:
|
||||
elem.clear()
|
||||
continue
|
||||
|
||||
if exist_sprts & {sport, event}:
|
||||
elem.clear()
|
||||
continue
|
||||
|
||||
|
|
@ -293,7 +299,7 @@ async def main(client: httpx.AsyncClient) -> None:
|
|||
title = ev["title"]
|
||||
link = ev["link"]
|
||||
|
||||
key = f"[{sport}: {event}] {title}"
|
||||
key = f"[{sport}: {event}] {title} (LTVSX)"
|
||||
|
||||
url = await safe_process_event(
|
||||
lambda: process_event(link, url_num=i),
|
||||
|
|
@ -308,6 +314,7 @@ async def main(client: httpx.AsyncClient) -> None:
|
|||
sport,
|
||||
"https://i.gyazo.com/ec27417a9644ae517196494afa72d2b9.png",
|
||||
),
|
||||
"base": "https://livetv.sx/enx/",
|
||||
"timestamp": now.timestamp(),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue