diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-11-30 11:34:51 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-12-03 19:52:31 +0530 |
commit | 71df9b7fd504767583cf1e088ae307c942799f2b (patch) | |
tree | 42112aba8946aee047ee9a8e411a00131882f0c8 /yt_dlp/extractor/common.py | |
parent | c9f5ce511877ae4f22d2eb2f70c3c6edf6c1971d (diff) | |
download | hypervideo-pre-71df9b7fd504767583cf1e088ae307c942799f2b.tar.lz hypervideo-pre-71df9b7fd504767583cf1e088ae307c942799f2b.tar.xz hypervideo-pre-71df9b7fd504767583cf1e088ae307c942799f2b.zip |
[cleanup] Misc
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r-- | yt_dlp/extractor/common.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py index 3ca8fe24c..3910c55ad 100644 --- a/yt_dlp/extractor/common.py +++ b/yt_dlp/extractor/common.py @@ -71,6 +71,7 @@ from ..utils import ( str_to_int, strip_or_none, traverse_obj, + truncate_string, try_call, try_get, unescapeHTML, @@ -674,7 +675,8 @@ class InfoExtractor: for _ in range(2): try: self.initialize() - self.write_debug('Extracting URL: %s' % url) + self.to_screen('Extracting URL: %s' % ( + url if self.get_param('verbose') else truncate_string(url, 100, 20))) ie_result = self._real_extract(url) if ie_result is None: return None @@ -1906,6 +1908,14 @@ class InfoExtractor: errnote=None, fatal=True, live=False, data=None, headers={}, query={}): + if not m3u8_url: + if errnote is not False: + errnote = errnote or 'Failed to obtain m3u8 URL' + if fatal: + raise ExtractorError(errnote, video_id=video_id) + self.report_warning(f'{errnote}{bug_reports_message()}') + return [], {} + res = self._download_webpage_handle( m3u8_url, video_id, note='Downloading m3u8 information' if note is None else note, |