mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 17:22:31 +01:00
[vimeo] Delegate ondemand redirects to ondemand extractor (closes #10994)
This commit is contained in:
parent
9dc13a6780
commit
f16f8505b1
@ -322,6 +322,22 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
|||||||
},
|
},
|
||||||
'expected_warnings': ['Unable to download JSON metadata'],
|
'expected_warnings': ['Unable to download JSON metadata'],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
# redirects to ondemand extractor and should be passed throught it
|
||||||
|
# for successful extraction
|
||||||
|
'url': 'https://vimeo.com/73445910',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '73445910',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'The Reluctant Revolutionary',
|
||||||
|
'uploader': '10Ft Films',
|
||||||
|
'uploader_url': 're:https?://(?:www\.)?vimeo\.com/tenfootfilms',
|
||||||
|
'uploader_id': 'tenfootfilms',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
'url': 'http://vimeo.com/moogaloop.swf?clip_id=2539741',
|
'url': 'http://vimeo.com/moogaloop.swf?clip_id=2539741',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
@ -414,7 +430,12 @@ def _real_extract(self, url):
|
|||||||
# Retrieve video webpage to extract further information
|
# Retrieve video webpage to extract further information
|
||||||
request = sanitized_Request(url, headers=headers)
|
request = sanitized_Request(url, headers=headers)
|
||||||
try:
|
try:
|
||||||
webpage = self._download_webpage(request, video_id)
|
webpage, urlh = self._download_webpage_handle(request, video_id)
|
||||||
|
# Some URLs redirect to ondemand can't be extracted with
|
||||||
|
# this extractor right away thus should be passed through
|
||||||
|
# ondemand extractor (e.g. https://vimeo.com/73445910)
|
||||||
|
if VimeoOndemandIE.suitable(urlh.geturl()):
|
||||||
|
return self.url_result(urlh.geturl(), VimeoOndemandIE.ie_key())
|
||||||
except ExtractorError as ee:
|
except ExtractorError as ee:
|
||||||
if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403:
|
if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403:
|
||||||
errmsg = ee.cause.read()
|
errmsg = ee.cause.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user