fix streambtw scraping
This commit is contained in:
doms9 2025-12-12 17:29:00 -05:00
parent 4a5726fcc8
commit 00000d9efc

View file

@ -44,10 +44,14 @@ async def process_event(
log.info(f"URL {url_num}) No M3U8 found") log.info(f"URL {url_num}) No M3U8 found")
return return
encoded = match[2][::-1] stream_link: str = match[2]
decoded = base64.b64decode(encoded[::-1]).decode("utf-8")
if not stream_link.startswith("http"):
stream_link = base64.b64decode(stream_link).decode("utf-8")
log.info(f"URL {url_num}) Captured M3U8") log.info(f"URL {url_num}) Captured M3U8")
return decoded
return stream_link
async def get_events(client: httpx.AsyncClient) -> list[dict[str, str]]: async def get_events(client: httpx.AsyncClient) -> list[dict[str, str]]: