From bbafbe20c233d00e86fc87a1b1ccab8cf9e88232 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sun, 22 Dec 2013 03:17:56 +0100 Subject: [PATCH] [vimeo] Better formatting for regexp --- youtube_dl/extractor/vimeo.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 @@ unsmuggle_url, ) + class VimeoIE(InfoExtractor): """Information extractor for vimeo.com.""" # _VALID_URL matches Vimeo URLs - _VALID_URL = r'(?Phttps?://)?(?:(?:www|(?Pplayer))\.)?vimeo(?Ppro)?\.com/(?:.*?/)?(?Pplay_redirect_hls\?clip_id=)?(?:videos?/)?(?P[0-9]+)/?(?:[?].*)?(?:#.*)?$' + _VALID_URL = r'''(?x) + (?Phttps?://)? + (?:(?:www|(?Pplayer))\.)? + vimeo(?Ppro)?\.com/ + (?:.*?/)? + (?Pplay_redirect_hls\?clip_id=)? + (?:videos?/)? + (?P[0-9]+) + /?(?:[?].*)?(?:[#].*)?$''' _NETRC_MACHINE = 'vimeo' IE_NAME = u'vimeo' _TESTS = [