mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-01 14:37:57 +00:00
InfoExtractors: use report_download_webpage in _request_webpage
Allows to show the warning when falling back on GenericIE
This commit is contained in:
parent
320e26a0af
commit
0d173446ff
1 changed files with 3 additions and 3 deletions
|
@ -114,8 +114,8 @@ class InfoExtractor(object):
|
||||||
def _request_webpage(self, url_or_request, video_id, note=None, errnote=None):
|
def _request_webpage(self, url_or_request, video_id, note=None, errnote=None):
|
||||||
""" Returns the response handle """
|
""" Returns the response handle """
|
||||||
if note is None:
|
if note is None:
|
||||||
note = u'Downloading video webpage'
|
self.report_download_webpage(video_id)
|
||||||
if note is not False:
|
elif note is not False:
|
||||||
self.to_screen(u'%s: %s' % (video_id, note))
|
self.to_screen(u'%s: %s' % (video_id, note))
|
||||||
try:
|
try:
|
||||||
return compat_urllib_request.urlopen(url_or_request)
|
return compat_urllib_request.urlopen(url_or_request)
|
||||||
|
@ -1318,7 +1318,7 @@ class GenericIE(InfoExtractor):
|
||||||
"""Report webpage download."""
|
"""Report webpage download."""
|
||||||
if not self._downloader.params.get('test', False):
|
if not self._downloader.params.get('test', False):
|
||||||
self._downloader.report_warning(u'Falling back on generic information extractor.')
|
self._downloader.report_warning(u'Falling back on generic information extractor.')
|
||||||
self.to_screen(u'%s: Downloading webpage' % video_id)
|
super(GenericIE, self).report_download_webpage(video_id)
|
||||||
|
|
||||||
def report_following_redirect(self, new_url):
|
def report_following_redirect(self, new_url):
|
||||||
"""Report information extraction."""
|
"""Report information extraction."""
|
||||||
|
|
Loading…
Reference in a new issue