e
This commit is contained in:
parent
6a93221b78
commit
00000d9729
1 changed files with 118 additions and 118 deletions
|
|
@ -29,13 +29,13 @@ async def process_event(
|
|||
return
|
||||
|
||||
valid_m3u8 = re.compile(
|
||||
r'var\s+randomM3u8\s*=\s*[\'"]([^\'"]+)[\'"]',
|
||||
r'var\s+(\w+)\s*=\s*["\']?(https?:\/\/[^"\'\s>]+\.m3u8)["\']?',
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
if match := valid_m3u8.search(r.text):
|
||||
log.info(f"URL {url_num}) Captured M3U8")
|
||||
return match[1]
|
||||
return match[2]
|
||||
|
||||
log.info(f"URL {url_num}) No M3U8 found")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue