[downloader/hls] Add support for AES-128 encrypted segments in hlsnative downloader
This commit is contained in:
parent
589568789f
commit
e154c65128
3 changed files with 68 additions and 36 deletions
|
@ -2852,3 +2852,12 @@ def decode_packed_codes(code):
|
|||
return re.sub(
|
||||
r'\b(\w+)\b', lambda mobj: symbol_table[mobj.group(0)],
|
||||
obfucasted_code)
|
||||
|
||||
|
||||
def parse_m3u8_attributes(attrib):
|
||||
info = {}
|
||||
for (key, val) in re.findall(r'(?P<key>[A-Z0-9-]+)=(?P<val>"[^"]+"|[^",]+)(?:,|$)', attrib):
|
||||
if val.startswith('"'):
|
||||
val = val[1:-1]
|
||||
info[key] = val
|
||||
return info
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue