mirror of
https://github.com/doms9/iptv.git
synced 2026-04-21 19:46:59 +02:00
update M3U8
This commit is contained in:
parent
f7fa191ce4
commit
fa72e64ecf
6 changed files with 440 additions and 305 deletions
364
M3U8/TV.m3u8
364
M3U8/TV.m3u8
File diff suppressed because it is too large
Load diff
364
M3U8/events.m3u8
364
M3U8/events.m3u8
File diff suppressed because it is too large
Load diff
|
|
@ -57,7 +57,10 @@ async def get_api_data() -> dict[str, dict[str, list[dict]]]:
|
||||||
tasks = [
|
tasks = [
|
||||||
(
|
(
|
||||||
sport,
|
sport,
|
||||||
network.request(urljoin(url, "api/v2/stateshot"), log=log),
|
network.request(
|
||||||
|
urljoin(url, "api/v2/stateshot"),
|
||||||
|
log=log,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
for sport, url in API_URLS.items()
|
for sport, url in API_URLS.items()
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ async def process_event(url: str, url_num: int) -> str | None:
|
||||||
|
|
||||||
|
|
||||||
async def get_events() -> dict[str, dict[str, str | float]]:
|
async def get_events() -> dict[str, dict[str, str | float]]:
|
||||||
now = Time.clean(Time.now())
|
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
if not (html_data := await network.request(BASE_URL, log=log)):
|
if not (html_data := await network.request(BASE_URL, log=log)):
|
||||||
return events
|
return events
|
||||||
|
|
||||||
|
now = Time.clean(Time.now())
|
||||||
|
|
||||||
pattern = re.compile(r"openEmbed\('([^']+)'\)", re.I)
|
pattern = re.compile(r"openEmbed\('([^']+)'\)", re.I)
|
||||||
|
|
||||||
soup = HTMLParser(html_data.content)
|
soup = HTMLParser(html_data.content)
|
||||||
|
|
|
||||||
|
|
@ -47,19 +47,19 @@ async def process_event(url: str, url_num: int) -> str | None:
|
||||||
|
|
||||||
|
|
||||||
async def get_events() -> list[dict[str, str]]:
|
async def get_events() -> list[dict[str, str]]:
|
||||||
now = Time.clean(Time.now())
|
|
||||||
|
|
||||||
events = []
|
events = []
|
||||||
|
|
||||||
if not (
|
if not (
|
||||||
r := await network.request(
|
r := await network.request(
|
||||||
API_URL,
|
API_URL,
|
||||||
log=log,
|
|
||||||
params={"pageNumber": 1, "pageSize": 500},
|
params={"pageNumber": 1, "pageSize": 500},
|
||||||
|
log=log,
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
return events
|
return events
|
||||||
|
|
||||||
|
now = Time.clean(Time.now())
|
||||||
|
|
||||||
api_data: list[dict] = r.json()
|
api_data: list[dict] = r.json()
|
||||||
|
|
||||||
for stream_group in api_data:
|
for stream_group in api_data:
|
||||||
|
|
|
||||||
|
|
@ -127,8 +127,8 @@ async def refresh_html_cache(
|
||||||
if not (
|
if not (
|
||||||
html_data := await network.request(
|
html_data := await network.request(
|
||||||
urljoin(BASE_URL, f"events/{date}"),
|
urljoin(BASE_URL, f"events/{date}"),
|
||||||
log=log,
|
|
||||||
params={"sport_id": sport_id},
|
params={"sport_id": sport_id},
|
||||||
|
log=log,
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
return events
|
return events
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue