mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 08:47:41 +00:00
This commit is contained in:
parent
e375a149e1
commit
74278def2e
2 changed files with 52 additions and 9 deletions
|
@ -859,6 +859,7 @@ from .vimeo import (
|
||||||
VimeoChannelIE,
|
VimeoChannelIE,
|
||||||
VimeoGroupsIE,
|
VimeoGroupsIE,
|
||||||
VimeoLikesIE,
|
VimeoLikesIE,
|
||||||
|
VimeoOndemandIE,
|
||||||
VimeoReviewIE,
|
VimeoReviewIE,
|
||||||
VimeoUserIE,
|
VimeoUserIE,
|
||||||
VimeoWatchLaterIE,
|
VimeoWatchLaterIE,
|
||||||
|
|
|
@ -73,15 +73,26 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
||||||
|
|
||||||
# _VALID_URL matches Vimeo URLs
|
# _VALID_URL matches Vimeo URLs
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:(?:www|(?P<player>player))\.)?
|
(?:
|
||||||
vimeo(?P<pro>pro)?\.com/
|
(?:
|
||||||
(?!channels/[^/?#]+/?(?:$|[?#])|album/)
|
www|
|
||||||
(?:.*?/)?
|
(?P<player>player)
|
||||||
(?:(?:play_redirect_hls|moogaloop\.swf)\?clip_id=)?
|
)
|
||||||
(?:videos?/)?
|
\.
|
||||||
(?P<id>[0-9]+)
|
)?
|
||||||
/?(?:[?&].*)?(?:[#].*)?$'''
|
vimeo(?P<pro>pro)?\.com/
|
||||||
|
(?!channels/[^/?#]+/?(?:$|[?#])|(?:album|ondemand)/)
|
||||||
|
(?:.*?/)?
|
||||||
|
(?:
|
||||||
|
(?:
|
||||||
|
play_redirect_hls|
|
||||||
|
moogaloop\.swf)\?clip_id=
|
||||||
|
)?
|
||||||
|
(?:videos?/)?
|
||||||
|
(?P<id>[0-9]+)
|
||||||
|
/?(?:[?&].*)?(?:[#].*)?$
|
||||||
|
'''
|
||||||
IE_NAME = 'vimeo'
|
IE_NAME = 'vimeo'
|
||||||
_TESTS = [
|
_TESTS = [
|
||||||
{
|
{
|
||||||
|
@ -497,6 +508,37 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class VimeoOndemandIE(VimeoBaseInfoExtractor):
|
||||||
|
_VALID_URL = r'https?://(?:www\.)?vimeo\.com/ondemand/(?P<id>[^/?#&]+)'
|
||||||
|
_TESTS = [{
|
||||||
|
# ondemand video not available via https://vimeo.com/id
|
||||||
|
'url': 'https://vimeo.com/ondemand/20704',
|
||||||
|
'md5': 'c424deda8c7f73c1dfb3edd7630e2f35',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '105442900',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'המעבדה - במאי יותם פלדמן',
|
||||||
|
'uploader': 'גם סרטים',
|
||||||
|
'uploader_url': 're:https?://(?:www\.)?vimeo\.com/gumfilms',
|
||||||
|
'uploader_id': 'gumfilms',
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://vimeo.com/ondemand/nazmaalik',
|
||||||
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://vimeo.com/ondemand/141692381',
|
||||||
|
'only_matching': True,
|
||||||
|
}, {
|
||||||
|
'url': 'https://vimeo.com/ondemand/thelastcolony/150274832',
|
||||||
|
'only_matching': True,
|
||||||
|
}]
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
return self.url_result(self._og_search_video_url(webpage), VimeoIE.ie_key())
|
||||||
|
|
||||||
|
|
||||||
class VimeoChannelIE(VimeoBaseInfoExtractor):
|
class VimeoChannelIE(VimeoBaseInfoExtractor):
|
||||||
IE_NAME = 'vimeo:channel'
|
IE_NAME = 'vimeo:channel'
|
||||||
_VALID_URL = r'https://vimeo\.com/channels/(?P<id>[^/?#]+)/?(?:$|[?#])'
|
_VALID_URL = r'https://vimeo\.com/channels/(?P<id>[^/?#]+)/?(?:$|[?#])'
|
||||||
|
|
Loading…
Reference in a new issue