mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-27 21:54:17 +01:00
hls: handle error when getting key
This commit is contained in:
parent
a2e430b699
commit
72ec064cc3
@ -83,7 +83,10 @@ class HLS(VideoRetriever):
|
|||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
match = re.search(r'URI="(https?://.*?)"', keydata)
|
match = re.search(r'URI="(https?://.*?)"', keydata)
|
||||||
key = get_http_data(match.group(1))
|
error, key = get_http_data(match.group(1))
|
||||||
|
if error:
|
||||||
|
log.error("Can't get crypto key to decode files.")
|
||||||
|
return
|
||||||
rand = os.urandom(16)
|
rand = os.urandom(16)
|
||||||
decryptor = AES.new(key, AES.MODE_CBC, rand)
|
decryptor = AES.new(key, AES.MODE_CBC, rand)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user