diff options
author | Philipp Hagemeister <[email protected]> | 2013-12-22 03:17:56 +0100 |
---|---|---|
committer | Philipp Hagemeister <[email protected]> | 2013-12-22 03:21:28 +0100 |
commit | bbafbe20c233d00e86fc87a1b1ccab8cf9e88232 (patch) | |
tree | a90319da6be5c4b197ee309c96c005ed60a738a2 | |
parent | c4d55a33fce91d846a6ae270ac3e4c69b7f45ba4 (diff) | |
download | youtube-dl-bbafbe20c233d00e86fc87a1b1ccab8cf9e88232.tar.gz youtube-dl-bbafbe20c233d00e86fc87a1b1ccab8cf9e88232.zip |
[vimeo] Better formatting for regexp
-rw-r--r-- | youtube_dl/extractor/vimeo.py | 11 |
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 = [ |