1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-12-22 16:57:40 +00:00

[vimeo] Better formatting for regexp

This commit is contained in:
Philipp Hagemeister 2013-12-22 03:17:56 +01:00
parent c4d55a33fc
commit bbafbe20c2

View file

@ -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 = [