mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-29 20:01:44 +00:00
[tumblr] Detect vid.me embeds (fixes #5883)
This commit is contained in:
parent
23dd1fc74c
commit
8f94784124
1 changed files with 17 additions and 0 deletions
|
@ -28,6 +28,17 @@ class TumblrIE(InfoExtractor):
|
|||
'description': 'md5:dba62ac8639482759c8eb10ce474586a',
|
||||
'thumbnail': 're:http://.*\.jpg',
|
||||
}
|
||||
}, {
|
||||
'url': 'http://naked-yogi.tumblr.com/post/118312946248/naked-smoking-stretching',
|
||||
'md5': 'de07e5211d60d4f3a2c3df757ea9f6ab',
|
||||
'info_dict': {
|
||||
'id': 'Wmur',
|
||||
'ext': 'mp4',
|
||||
'title': 'naked smoking & stretching',
|
||||
'upload_date': '20150506',
|
||||
'timestamp': 1430931613,
|
||||
},
|
||||
'add_ie': ['Vidme'],
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
|
@ -38,6 +49,12 @@ def _real_extract(self, url):
|
|||
url = 'http://%s.tumblr.com/post/%s/' % (blog, video_id)
|
||||
webpage = self._download_webpage(url, video_id)
|
||||
|
||||
vid_me_embed_url = self._search_regex(
|
||||
r'src=[\'"](https?://vid\.me/[^\'"]+)[\'"]',
|
||||
webpage, 'vid.me embed', default=None)
|
||||
if vid_me_embed_url is not None:
|
||||
return self.url_result(vid_me_embed_url, 'Vidme')
|
||||
|
||||
iframe_url = self._search_regex(
|
||||
r'src=\'(https?://www\.tumblr\.com/video/[^\']+)\'',
|
||||
webpage, 'iframe url')
|
||||
|
|
Loading…
Reference in a new issue