update M3U8
This commit is contained in:
parent
b4af711a51
commit
a7ee4a8d31
3 changed files with 1086 additions and 486 deletions
784
M3U8/TV.m3u8
784
M3U8/TV.m3u8
File diff suppressed because it is too large
Load diff
784
M3U8/events.m3u8
784
M3U8/events.m3u8
File diff suppressed because it is too large
Load diff
|
|
@ -32,7 +32,7 @@ async def get_events(client: httpx.AsyncClient) -> dict[str, dict[str, str | flo
|
||||||
|
|
||||||
data = await get_data(client)
|
data = await get_data(client)
|
||||||
|
|
||||||
for i, line in enumerate(data):
|
for i, line in enumerate(data, start=1):
|
||||||
if line.startswith("#EXTINF"):
|
if line.startswith("#EXTINF"):
|
||||||
tvg_id_match = re.search(r'tvg-id="([^"]*)"', line)
|
tvg_id_match = re.search(r'tvg-id="([^"]*)"', line)
|
||||||
tvg_name_match = re.search(r'tvg-name="([^"]*)"', line)
|
tvg_name_match = re.search(r'tvg-name="([^"]*)"', line)
|
||||||
|
|
@ -40,7 +40,7 @@ async def get_events(client: httpx.AsyncClient) -> dict[str, dict[str, str | flo
|
||||||
|
|
||||||
tvg = tvg_id_match[1] if tvg_id_match else None
|
tvg = tvg_id_match[1] if tvg_id_match else None
|
||||||
|
|
||||||
if not tvg and (url := data[i + 1]).endswith("/sd"):
|
if not tvg and (url := data[i]).endswith("/sd"):
|
||||||
if tvg_name := tvg_name_match[1]:
|
if tvg_name := tvg_name_match[1]:
|
||||||
sport = group_title_match[1].upper().strip()
|
sport = group_title_match[1].upper().strip()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue