mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 04:05:39 +01:00
hls: move cryptography to top imports.
This commit is contained in:
parent
05c322a52a
commit
c4bf81fa9e
@ -9,6 +9,8 @@ from datetime import datetime, timedelta
|
|||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
||||||
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
|
||||||
from svtplay_dl.utils.output import progressbar, progress_stream, ETA, output
|
from svtplay_dl.utils.output import progressbar, progress_stream, ETA, output
|
||||||
from svtplay_dl.utils.http import get_full_url
|
from svtplay_dl.utils.http import get_full_url
|
||||||
@ -126,10 +128,6 @@ class HLS(VideoRetriever):
|
|||||||
m3u8 = M3U8(self.http.request("get", url, cookies=cookies).text)
|
m3u8 = M3U8(self.http.request("get", url, cookies=cookies).text)
|
||||||
key = None
|
key = None
|
||||||
|
|
||||||
if m3u8.encrypted:
|
|
||||||
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
|
||||||
from cryptography.hazmat.backends import default_backend
|
|
||||||
|
|
||||||
def random_iv():
|
def random_iv():
|
||||||
return os.urandom(16)
|
return os.urandom(16)
|
||||||
file_d = output(file_name[0], self.config, file_name[1])
|
file_d = output(file_name[0], self.config, file_name[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user