e
This commit is contained in:
parent
00000d94a2
commit
00000d9a95
12 changed files with 160 additions and 55 deletions
|
|
@ -5,9 +5,9 @@ import httpx
|
|||
from selectolax.parser import HTMLParser
|
||||
|
||||
from .utils import (
|
||||
LOGOS,
|
||||
get_base,
|
||||
get_logger,
|
||||
league_info,
|
||||
load_cache,
|
||||
now,
|
||||
safe_process_event,
|
||||
|
|
@ -76,7 +76,6 @@ async def get_events(
|
|||
{
|
||||
"sport": event_name,
|
||||
"link": urljoin(base_url, href),
|
||||
"logo": LOGOS.get(event_name, LOGOS["default"]),
|
||||
"href": href,
|
||||
}
|
||||
)
|
||||
|
|
@ -152,17 +151,18 @@ async def main(client: httpx.AsyncClient) -> None:
|
|||
)
|
||||
|
||||
if url:
|
||||
sport = ev["sport"]
|
||||
|
||||
key = (
|
||||
f"[{ev['sport']}] {match_name} (FSTV)"
|
||||
if match_name
|
||||
else f"[{ev['sport']}] (FSTV)"
|
||||
f"[{sport}] {match_name} (FSTV)" if match_name else f"[{sport}] (FSTV)"
|
||||
)
|
||||
|
||||
entry = {
|
||||
"url": url,
|
||||
"logo": ev["logo"],
|
||||
"logo": league_info(sport)["logo"],
|
||||
"base": base_url,
|
||||
"timestamp": now.timestamp(),
|
||||
"tvg-id": league_info(sport)["id"],
|
||||
"href": ev["href"],
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue