From: Philipp Hagemeister Date: Tue, 5 Feb 2013 12:42:08 +0000 (+0100) Subject: Support direct vimeo links (Closes #666) X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=8edc2cf8ca866fe1aded3f7b3ccf6df277b2e9f7;p=youtube-dl Support direct vimeo links (Closes #666) --- diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index b99a6c505..ac3ecea92 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -978,7 +978,7 @@ class VimeoIE(InfoExtractor): """Information extractor for vimeo.com.""" # _VALID_URL matches Vimeo URLs - _VALID_URL = r'(?:https?://)?(?:(?:www|player).)?vimeo\.com/(?:(?:groups|album)/[^/]+/)?(?:videos?/)?([0-9]+)' + _VALID_URL = r'(?Phttps?://)?(?:(?:www|player)\.)?vimeo\.com/(?:(?:groups|album)/[^/]+/)?(?Pplay_redirect_hls\?clip_id=)?(?:videos?/)?(?P[0-9]+)' IE_NAME = u'vimeo' def __init__(self, downloader=None): @@ -999,7 +999,11 @@ class VimeoIE(InfoExtractor): self._downloader.trouble(u'ERROR: Invalid URL: %s' % url) return - video_id = mobj.group(1) + video_id = mobj.group('id') + if not mobj.group('proto'): + url = 'https://' + url + if mobj.group('direct_link'): + url = 'https://vimeo.com/' + video_id # Retrieve video webpage to extract further information request = compat_urllib_request.Request(url, None, std_headers)