aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-08-07 16:50:46 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-08-07 21:17:07 +0530
commitb868936cd6d619f0e3a2c303028c132b761e6313 (patch)
treed68c763f4c861bec36ce1b7e9a8136dd01368d93 /yt_dlp/extractor/common.py
parentc681cb5d931b61a4370c56c8da82f01f3983f000 (diff)
downloadhypervideo-pre-b868936cd6d619f0e3a2c303028c132b761e6313.tar.lz
hypervideo-pre-b868936cd6d619f0e3a2c303028c132b761e6313.tar.xz
hypervideo-pre-b868936cd6d619f0e3a2c303028c132b761e6313.zip
[cleanup] Misc
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index 25b6dbc50..d6fb56db2 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -35,7 +35,6 @@ from ..downloader.f4m import (
remove_encrypted_media,
)
from ..utils import (
- NO_DEFAULT,
age_restricted,
base_url,
bug_reports_message,
@@ -45,10 +44,11 @@ from ..utils import (
determine_protocol,
dict_get,
error_to_compat_str,
- ExtractorError,
extract_attributes,
+ ExtractorError,
fix_xml_ampersands,
float_or_none,
+ format_field,
GeoRestrictedError,
GeoUtils,
int_or_none,
@@ -56,6 +56,7 @@ from ..utils import (
JSON_LD_RE,
mimetype2ext,
network_exceptions,
+ NO_DEFAULT,
orderedSet,
parse_bitrate,
parse_codecs,
@@ -64,8 +65,8 @@ from ..utils import (
parse_m3u8_attributes,
parse_resolution,
RegexNotFoundError,
- sanitized_Request,
sanitize_filename,
+ sanitized_Request,
str_or_none,
str_to_int,
strip_or_none,
@@ -75,9 +76,9 @@ from ..utils import (
unified_timestamp,
update_Request,
update_url_query,
- urljoin,
url_basename,
url_or_none,
+ urljoin,
variadic,
xpath_element,
xpath_text,
@@ -1002,7 +1003,7 @@ class InfoExtractor(object):
return res if res is False else res[0]
def report_warning(self, msg, video_id=None, *args, only_once=False, **kwargs):
- idstr = '' if video_id is None else '%s: ' % video_id
+ idstr = format_field(video_id, template='%s: ')
msg = f'[{self.IE_NAME}] {idstr}{msg}'
if only_once:
if f'WARNING: {msg}' in self._printed_messages: