InfoExtractor._search_regex: Suggest updating when the regex is not found (suggested in #5442)

Reuse the same message from ExtractorError
This commit is contained in:
Jaime Marquínez Ferrándiz 2015-04-17 14:55:24 +02:00
parent 3220c50f9a
commit 08f2a92c9c
2 changed files with 14 additions and 9 deletions

View file

@ -23,6 +23,7 @@ from ..compat import (
)
from ..utils import (
age_restricted,
bug_reports_message,
clean_html,
compiled_regex_type,
ExtractorError,
@ -556,8 +557,7 @@ class InfoExtractor(object):
elif fatal:
raise RegexNotFoundError('Unable to extract %s' % _name)
else:
self._downloader.report_warning('unable to extract %s; '
'please report this issue on http://yt-dl.org/bug' % _name)
self._downloader.report_warning('unable to extract %s' % _name + bug_reports_message())
return None
def _html_search_regex(self, pattern, string, name, default=_NO_DEFAULT, fatal=True, flags=0, group=None):