1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 16:45:17 +00:00

[cleanup] Misc

This commit is contained in:
pukkandan
2022-11-30 11:34:51 +05:30
parent c9f5ce5118
commit 71df9b7fd5
11 changed files with 72 additions and 40 deletions

View File

@ -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,