mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-28 06:04:17 +01:00
hls: sometimes they have the key as a filename without url
This commit is contained in:
parent
892b738bcb
commit
2c2446b30b
@ -88,7 +88,11 @@ class HLS(VideoRetriever):
|
||||
sys.exit(2)
|
||||
|
||||
match = re.search(r'URI="(https?://.*?)"', keydata)
|
||||
key = self.http.request("get", match.group(1)).content
|
||||
if not match:
|
||||
match = re.search(r'URI="([^"]+)"', keydata)
|
||||
keyurl = _get_full_url(match.group(1), self.url)
|
||||
key = self.http.request("get", keyurl, cookies=cookies).content
|
||||
|
||||
rand = os.urandom(16)
|
||||
decryptor = AES.new(key, AES.MODE_CBC, rand)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user