mirror of
https://github.com/doms9/iptv.git
synced 2026-04-22 19:57:00 +02:00
e
- change caching process for select sites
This commit is contained in:
parent
6b209de1d8
commit
00000d9ef7
9 changed files with 138 additions and 212 deletions
|
|
@ -30,8 +30,11 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
|
||||
if r := await network.request(
|
||||
urljoin(API_URL, "api/v1/events/sports"),
|
||||
params={
|
||||
"user": "cdnlivetv",
|
||||
"plan": "free",
|
||||
},
|
||||
log=log,
|
||||
params={"user": "cdnlivetv", "plan": "free"},
|
||||
):
|
||||
api_data = r.json().get("cdn-live-tv")
|
||||
|
||||
|
|
@ -68,22 +71,11 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
|
||||
event_links: list[str] = [channel["url"] for channel in channels]
|
||||
|
||||
# if not (
|
||||
# link := (
|
||||
# event_links[0]
|
||||
# if len(event_links) == 1
|
||||
# else await network.get_base(event_links)
|
||||
# )
|
||||
# ):
|
||||
# continue
|
||||
|
||||
link = event_links[0]
|
||||
|
||||
events.append(
|
||||
{
|
||||
"sport": league,
|
||||
"event": name,
|
||||
"link": link,
|
||||
"link": event_links[0],
|
||||
"timestamp": event_dt.timestamp(),
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue