e
This commit is contained in:
parent
a979f0bf75
commit
00000d97a5
8 changed files with 40 additions and 29 deletions
|
|
@ -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]]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue