This commit is contained in:
doms9 2025-12-06 00:26:59 -05:00
parent a979f0bf75
commit 00000d97a5
8 changed files with 40 additions and 29 deletions

View file

@ -40,13 +40,14 @@ async def process_event(
valid_m3u8 = re.compile(r'var\s+(\w+)\s*=\s*"([^"]*)"', re.IGNORECASE)
if match := valid_m3u8.search(r.text):
encoded = match[2][::-1]
decoded = base64.b64decode(encoded[::-1]).decode("utf-8")
log.info(f"URL {url_num}) Captured M3U8")
return decoded
if not (match := valid_m3u8.search(r.text)):
log.info(f"URL {url_num}) No M3U8 found")
return
log.info(f"URL {url_num}) No M3U8 found")
encoded = match[2][::-1]
decoded = base64.b64decode(encoded[::-1]).decode("utf-8")
log.info(f"URL {url_num}) Captured M3U8")
return decoded
async def get_events(client: httpx.AsyncClient) -> list[dict[str, str]]: