diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-01-08 22:42:52 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-01-08 22:42:52 +0100 |
commit | 3fabeaa1f49d6ce15d67bfe31cad80002cdc5c94 (patch) | |
tree | 8504f8ea179ffa2d1fb0e68578f5f3c009397d41 | |
parent | 35aa7098cd22249e3ab446925a27c57572ff49d9 (diff) |
[vimeo] Support protocol-relative URLs
-rw-r--r-- | youtube_dl/extractor/generic.py | 2 | ||||
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index ff23161d7..a9023f38d 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -230,7 +230,7 @@ class GenericIE(InfoExtractor): # Look for embedded (iframe) Vimeo player mobj = re.search( - r'<iframe[^>]+?src="(https?://player.vimeo.com/video/.+?)"', webpage) + r'<iframe[^>]+?src="((?:https?:)?//player.vimeo.com/video/.+?)"', webpage) if mobj: player_url = unescapeHTML(mobj.group(1)) surl = smuggle_url(player_url, {'Referer': url}) diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py index 540ca4fcc..193675549 100644 --- a/youtube_dl/extractor/vimeo.py +++ b/youtube_dl/extractor/vimeo.py @@ -24,7 +24,7 @@ class VimeoIE(InfoExtractor): # _VALID_URL matches Vimeo URLs _VALID_URL = r'''(?x) - (?P<proto>https?://)? + (?P<proto>(?:https?:)?//)? (?:(?:www|(?P<player>player))\.)? vimeo(?P<pro>pro)?\.com/ (?:.*?/)? @@ -149,9 +149,6 @@ class VimeoIE(InfoExtractor): # Extract ID from URL mobj = re.match(self._VALID_URL, url) - if mobj is None: - raise ExtractorError('Invalid URL: %s' % url) - video_id = mobj.group('id') if mobj.group('pro') or mobj.group('player'): url = 'http://player.vimeo.com/video/' + video_id |