mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-23 00:54:31 +01:00
[Vimeo] Add new embedded type
This commit is contained in:
parent
8cb10807ed
commit
f7b7401a76
@ -482,10 +482,15 @@ class VimeoIE(VimeoBaseInfoExtractor):
|
|||||||
r'<embed[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vimeo\.com/moogaloop\.swf.+?)\1',
|
r'<embed[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vimeo\.com/moogaloop\.swf.+?)\1',
|
||||||
# Look more for non-standard embedded Vimeo player
|
# Look more for non-standard embedded Vimeo player
|
||||||
r'<video[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vimeo\.com/[0-9]+)\1',
|
r'<video[^>]+src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?vimeo\.com/[0-9]+)\1',
|
||||||
|
# Look for JS embedded Vimeo player
|
||||||
|
r'<video-player[^>]+vimeo-id="(?P<id>\d+)"',
|
||||||
)
|
)
|
||||||
for embed_re in PLAIN_EMBED_RE:
|
for embed_re in PLAIN_EMBED_RE:
|
||||||
for mobj in re.finditer(embed_re, webpage):
|
for mobj in re.finditer(embed_re, webpage):
|
||||||
urls.append(mobj.group('url'))
|
if mobj.group('id'):
|
||||||
|
urls.append('https://player.vimeo.com/video/' + mobj.group('id'))
|
||||||
|
else:
|
||||||
|
urls.append(mobj.group('url'))
|
||||||
return urls
|
return urls
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user