aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-22 03:17:56 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-22 03:21:28 +0100
commitbbafbe20c233d00e86fc87a1b1ccab8cf9e88232 (patch)
treea90319da6be5c4b197ee309c96c005ed60a738a2 /youtube_dl
parentc4d55a33fce91d846a6ae270ac3e4c69b7f45ba4 (diff)
[vimeo] Better formatting for regexp
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/vimeo.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index ea4409528..4e8fef165 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -16,11 +16,20 @@ from ..utils import (
unsmuggle_url,
)
+
class VimeoIE(InfoExtractor):
"""Information extractor for vimeo.com."""
# _VALID_URL matches Vimeo URLs
- _VALID_URL = r'(?P<proto>https?://)?(?:(?:www|(?P<player>player))\.)?vimeo(?P<pro>pro)?\.com/(?:.*?/)?(?P<direct_link>play_redirect_hls\?clip_id=)?(?:videos?/)?(?P<id>[0-9]+)/?(?:[?].*)?(?:#.*)?$'
+ _VALID_URL = r'''(?x)
+ (?P<proto>https?://)?
+ (?:(?:www|(?P<player>player))\.)?
+ vimeo(?P<pro>pro)?\.com/
+ (?:.*?/)?
+ (?P<direct_link>play_redirect_hls\?clip_id=)?
+ (?:videos?/)?
+ (?P<id>[0-9]+)
+ /?(?:[?].*)?(?:[#].*)?$'''
_NETRC_MACHINE = 'vimeo'
IE_NAME = u'vimeo'
_TESTS = [