mirror of
https://github.com/doms9/iptv.git
synced 2026-06-06 02:43:05 +02:00
e
- misc edits.
This commit is contained in:
parent
22645d6b75
commit
00000d9e1a
4 changed files with 4 additions and 21 deletions
|
|
@ -104,9 +104,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
|
|||
for game in data.get("games", {}):
|
||||
game_id = game["id"]
|
||||
|
||||
game_time = game["datetime"]
|
||||
|
||||
event_dt = Time.from_str(game_time, timezone="UTC")
|
||||
event_dt = Time.fromisoformat(game["datetime"]).to_tz("EST")
|
||||
|
||||
if not start_dt <= event_dt <= end_dt:
|
||||
continue
|
||||
|
|
|
|||
|
|
@ -54,12 +54,9 @@ async def process_event(
|
|||
return
|
||||
|
||||
try:
|
||||
if btn := page.locator("button.streambutton").first:
|
||||
await btn.click(
|
||||
force=True,
|
||||
click_count=2,
|
||||
timeout=3_000,
|
||||
)
|
||||
btn = page.locator("button.streambutton").first
|
||||
|
||||
await btn.dblclick(force=True, timeout=3_000)
|
||||
|
||||
await page.wait_for_function(
|
||||
"() => typeof clapprPlayer !== 'undefined'",
|
||||
|
|
|
|||
|
|
@ -81,12 +81,8 @@ class Time(datetime):
|
|||
"%Y-%m-%d %I:%M %p",
|
||||
"%Y-%m-%d %H:%M %p",
|
||||
"%Y-%m-%dT%H:%M:%S",
|
||||
"%Y-%m-%dT%H:%M:%SZ",
|
||||
"%Y-%m-%dT%H:%M:%S%z",
|
||||
"%Y-%m-%dT%H:%M:%S.%fZ",
|
||||
"%Y/%m/%d %H:%M",
|
||||
"%Y/%m/%d %H:%M:%S",
|
||||
"%Y/%m/%dT%H:%M:%S.%fZ",
|
||||
"%m/%d/%Y %H:%M",
|
||||
"%m/%d/%Y %I:%M %p",
|
||||
"%m/%d/%Y %H:%M:%S",
|
||||
|
|
|
|||
|
|
@ -270,7 +270,6 @@ class Network:
|
|||
log.warning(
|
||||
f"URL {url_num}) Status Code: {resp.status if resp else 'None'}"
|
||||
)
|
||||
|
||||
return
|
||||
|
||||
wait_task = asyncio.create_task(got_one.wait())
|
||||
|
|
@ -279,7 +278,6 @@ class Network:
|
|||
await asyncio.wait_for(wait_task, timeout=timeout)
|
||||
except asyncio.TimeoutError:
|
||||
log.warning(f"URL {url_num}) Timed out waiting for M3U8.")
|
||||
|
||||
return
|
||||
|
||||
finally:
|
||||
|
|
@ -293,16 +291,10 @@ class Network:
|
|||
|
||||
if captured:
|
||||
log.info(f"URL {url_num}) Captured M3U8")
|
||||
|
||||
return captured[0]
|
||||
|
||||
log.warning(f"URL {url_num}) No M3U8 captured after waiting.")
|
||||
|
||||
return
|
||||
|
||||
except Exception as e:
|
||||
log.warning(f"URL {url_num}) {e}")
|
||||
|
||||
return
|
||||
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue