mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-23 19:55:38 +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 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.http import get_full_url
|
||||
@ -126,10 +128,6 @@ class HLS(VideoRetriever):
|
||||
m3u8 = M3U8(self.http.request("get", url, cookies=cookies).text)
|
||||
key = None
|
||||
|
||||
if m3u8.encrypted:
|
||||
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
||||
from cryptography.hazmat.backends import default_backend
|
||||
|
||||
def random_iv():
|
||||
return os.urandom(16)
|
||||
file_d = output(file_name[0], self.config, file_name[1])
|
||||
|
Loading…
Reference in New Issue
Block a user