projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[gameone] simplify playlist extractor
[youtube-dl]
/
youtube_dl
/
extractor
/
generic.py
diff --git
a/youtube_dl/extractor/generic.py
b/youtube_dl/extractor/generic.py
index 9dd03aba48ed612c429f7b37ceca22dbd789fd9d..f97b59845706b8e33d4438b5cab968a2251b1ad9 100644
(file)
--- a/
youtube_dl/extractor/generic.py
+++ b/
youtube_dl/extractor/generic.py
@@
-383,7
+383,7
@@
class GenericIE(InfoExtractor):
if not parsed_url.scheme:
default_search = self._downloader.params.get('default_search')
if default_search is None:
if not parsed_url.scheme:
default_search = self._downloader.params.get('default_search')
if default_search is None:
- default_search = '
auto_warning
'
+ default_search = '
error
'
if default_search in ('auto', 'auto_warning'):
if '/' in url:
if default_search in ('auto', 'auto_warning'):
if '/' in url:
@@
-397,8
+397,13
@@
class GenericIE(InfoExtractor):
expected=True)
else:
self._downloader.report_warning(
expected=True)
else:
self._downloader.report_warning(
- 'Falling back to youtube search for %s . Set --default-search
to
"auto" to suppress this warning.' % url)
+ 'Falling back to youtube search for %s . Set --default-search "auto" to suppress this warning.' % url)
return self.url_result('ytsearch:' + url)
return self.url_result('ytsearch:' + url)
+ elif default_search == 'error':
+ raise ExtractorError(
+ ('%r is not a valid URL. '
+ 'Set --default-search "ytseach" (or run youtube-dl "ytsearch:%s" ) to search YouTube'
+ ) % (url, url), expected=True)
else:
assert ':' in default_search
return self.url_result(default_search + url)
else:
assert ':' in default_search
return self.url_result(default_search + url)
@@
-620,6
+625,11
@@
class GenericIE(InfoExtractor):
if mobj is not None:
return self.url_result(mobj.group('url'), 'VK')
if mobj is not None:
return self.url_result(mobj.group('url'), 'VK')
+ # Look for embedded ivi player
+ mobj = re.search(r'<embed[^>]+?src=(["\'])(?P<url>https?://(?:www\.)?ivi\.ru/video/player.+?)\1', webpage)
+ if mobj is not None:
+ return self.url_result(mobj.group('url'), 'Ivi')
+
# Look for embedded Huffington Post player
mobj = re.search(
r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1', webpage)
# Look for embedded Huffington Post player
mobj = re.search(
r'<iframe[^>]+?src=(["\'])(?P<url>https?://embed\.live\.huffingtonpost\.com/.+?)\1', webpage)