diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-16 15:31:10 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-04-17 04:16:41 +0530 |
commit | 6a39ee13f7613767905a4669d1d0247aafc5a12c (patch) | |
tree | f81a187ae9849b760a3042dc449e4d3a7df54753 /yt_dlp/extractor/generic.py | |
parent | 33245766ab0b7be7971ff46f03c706d77a327a92 (diff) | |
download | hypervideo-pre-6a39ee13f7613767905a4669d1d0247aafc5a12c.tar.lz hypervideo-pre-6a39ee13f7613767905a4669d1d0247aafc5a12c.tar.xz hypervideo-pre-6a39ee13f7613767905a4669d1d0247aafc5a12c.zip |
Fix inconsistent use of `report_warning`
Diffstat (limited to 'yt_dlp/extractor/generic.py')
-rw-r--r-- | yt_dlp/extractor/generic.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/extractor/generic.py b/yt_dlp/extractor/generic.py index 54cba2f6b..4250d1093 100644 --- a/yt_dlp/extractor/generic.py +++ b/yt_dlp/extractor/generic.py @@ -2376,7 +2376,7 @@ class GenericIE(InfoExtractor): if default_search in ('auto', 'auto_warning', 'fixup_error'): if re.match(r'^[^\s/]+\.[^\s/]+/', url): - self._downloader.report_warning('The url doesn\'t specify the protocol, trying with http') + self.report_warning('The url doesn\'t specify the protocol, trying with http') return self.url_result('http://' + url) elif default_search != 'fixup_error': if default_search == 'auto_warning': @@ -2385,7 +2385,7 @@ class GenericIE(InfoExtractor): 'Invalid URL: %r . Call yt-dlp like this: yt-dlp -v "https://www.youtube.com/watch?v=BaW_jenozKc" ' % url, expected=True) else: - self._downloader.report_warning( + self.report_warning( 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url) return self.url_result('ytsearch:' + url) @@ -2461,7 +2461,7 @@ class GenericIE(InfoExtractor): if not self._downloader.params.get('test', False) and not is_intentional: force = self._downloader.params.get('force_generic_extractor', False) - self._downloader.report_warning( + self.report_warning( '%s on generic information extractor.' % ('Forcing' if force else 'Falling back')) if not full_response: @@ -2488,7 +2488,7 @@ class GenericIE(InfoExtractor): # Maybe it's a direct link to a video? # Be careful not to download the whole thing! if not is_html(first_bytes): - self._downloader.report_warning( + self.report_warning( 'URL could be a direct video link, returning it as such.') info_dict.update({ 'direct': True, |