From: Philipp Hagemeister Date: Sun, 22 Dec 2013 02:17:56 +0000 (+0100) Subject: [vimeo] Better formatting for regexp X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=bbafbe20c233d00e86fc87a1b1ccab8cf9e88232;p=youtube-dl [vimeo] Better formatting for regexp --- 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'(?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 = [