1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-03 23:43:21 -04:00

[dependencies] Create module with all dependency imports

This commit is contained in:
pukkandan
2022-04-21 00:35:57 +05:30
parent 62f6f1cbf2
commit 9b8ee23b99
13 changed files with 127 additions and 112 deletions

View File

@@ -5,7 +5,8 @@ import re
from .external import FFmpegFD
from .fragment import FragmentFD
from .. import webvtt
from ..compat import compat_pycrypto_AES, compat_urlparse
from ..compat import compat_urlparse
from ..dependencies import Cryptodome_AES
from ..downloader import get_suitable_downloader
from ..utils import bug_reports_message, parse_m3u8_attributes, update_url_query
@@ -60,7 +61,7 @@ class HlsFD(FragmentFD):
s = urlh.read().decode('utf-8', 'ignore')
can_download, message = self.can_download(s, info_dict, self.params.get('allow_unplayable_formats')), None
if can_download and not compat_pycrypto_AES and '#EXT-X-KEY:METHOD=AES-128' in s:
if can_download and not Cryptodome_AES and '#EXT-X-KEY:METHOD=AES-128' in s:
if FFmpegFD.available():
can_download, message = False, 'The stream has AES-128 encryption and pycryptodomex is not available'
else: