mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 14:14:54 +01:00
[tumblr] Support Vimeo embeds (fixes #5969)
This commit is contained in:
parent
b407e173e4
commit
c5895d5dbd
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .pornhub import PornHubIE
|
from .pornhub import PornHubIE
|
||||||
|
from .vimeo import VimeoIE
|
||||||
|
|
||||||
|
|
||||||
class TumblrIE(InfoExtractor):
|
class TumblrIE(InfoExtractor):
|
||||||
|
@ -40,6 +41,17 @@ class TumblrIE(InfoExtractor):
|
||||||
'timestamp': 1430931613,
|
'timestamp': 1430931613,
|
||||||
},
|
},
|
||||||
'add_ie': ['Vidme'],
|
'add_ie': ['Vidme'],
|
||||||
|
}, {
|
||||||
|
'url': 'http://camdamage.tumblr.com/post/98846056295/',
|
||||||
|
'md5': 'a9e0c8371ea1ca306d6554e3fecf50b6',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '105463834',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Cam Damage-HD 720p',
|
||||||
|
'uploader': 'John Moyer',
|
||||||
|
'uploader_id': 'user32021558',
|
||||||
|
},
|
||||||
|
'add_ie': ['Vimeo'],
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
@ -60,6 +72,10 @@ def _real_extract(self, url):
|
||||||
if pornhub_url:
|
if pornhub_url:
|
||||||
return self.url_result(pornhub_url, 'PornHub')
|
return self.url_result(pornhub_url, 'PornHub')
|
||||||
|
|
||||||
|
vimeo_url = VimeoIE._extract_vimeo_url(url, webpage)
|
||||||
|
if vimeo_url:
|
||||||
|
return self.url_result(vimeo_url, 'Vimeo')
|
||||||
|
|
||||||
iframe_url = self._search_regex(
|
iframe_url = self._search_regex(
|
||||||
r'src=\'(https?://www\.tumblr\.com/video/[^\']+)\'',
|
r'src=\'(https?://www\.tumblr\.com/video/[^\']+)\'',
|
||||||
webpage, 'iframe url')
|
webpage, 'iframe url')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user