update M3U8
This commit is contained in:
parent
8108f3d4b6
commit
16c09b9b87
3 changed files with 972 additions and 264 deletions
|
|
@ -10,7 +10,7 @@ urls: dict[str, dict[str, str | float]] = {}
|
|||
|
||||
CACHE_FILE = Cache("pixel.json", exp=10_800)
|
||||
|
||||
API_FILE = Cache("pixel-api.json", exp=28_800)
|
||||
API_FILE = Cache("pixel-api.json", exp=86_400)
|
||||
|
||||
BASE_URL = "https://pixelsport.tv/backend/livetv/events"
|
||||
|
||||
|
|
@ -62,7 +62,7 @@ async def get_events(
|
|||
start_dt = now.delta(minutes=-30)
|
||||
end_dt = now.delta(minutes=30)
|
||||
|
||||
for event in api_data["events"]:
|
||||
for event in api_data.get("events", []):
|
||||
event_dt = Time.from_str(event["date"], timezone="UTC")
|
||||
|
||||
if now.date() != event_dt.date():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue