1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

hls: move cryptography to top imports.

This commit is contained in:
Johan Andersson 2019-03-24 21:04:41 +01:00
parent 05c322a52a
commit c4bf81fa9e

View File

@ -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])