mirror of
https://github.com/doms9/iptv.git
synced 2026-03-10 11:47:34 +01:00
e
- add totalsportek1.py - misc edits
This commit is contained in:
parent
b2f11e6da5
commit
00000d9eed
10 changed files with 259 additions and 78 deletions
|
|
@ -17,14 +17,17 @@ CACHE_FILE = Cache(TAG, exp=10_800)
|
|||
|
||||
BASE_URL = "https://xstreameast.com"
|
||||
|
||||
SPORT_ENDPOINTS = [
|
||||
# "mlb",
|
||||
"mma",
|
||||
"nba",
|
||||
# "nfl",
|
||||
# "nhl",
|
||||
"soccer",
|
||||
"wwe",
|
||||
SPORT_URLS = [
|
||||
urljoin(BASE_URL, f"categories/{sport}/")
|
||||
for sport in [
|
||||
# "mlb",
|
||||
"mma",
|
||||
"nba",
|
||||
# "nfl",
|
||||
# "nhl",
|
||||
"soccer",
|
||||
"wwe",
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -66,13 +69,7 @@ async def process_event(url: str, url_num: int) -> tuple[str | None, str | None]
|
|||
|
||||
|
||||
async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
||||
tasks = [
|
||||
network.request(
|
||||
urljoin(BASE_URL, f"categories/{sport}/"),
|
||||
log=log,
|
||||
)
|
||||
for sport in SPORT_ENDPOINTS
|
||||
]
|
||||
tasks = [network.request(url, log=log) for url in SPORT_URLS]
|
||||
|
||||
results = await asyncio.gather(*tasks)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue