aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-06-21 18:30:38 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-06-21 18:30:38 +0800
commitc5895d5dbdc33fbad1c91f448704d7711448220d (patch)
tree6bfabe2a8ea98d2bbe3a98331b1efac8b52594b1 /youtube_dl/extractor
parentb407e173e44041b1a92fb61e316f92d19834a40a (diff)
[tumblr] Support Vimeo embeds (fixes #5969)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/tumblr.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/youtube_dl/extractor/tumblr.py b/youtube_dl/extractor/tumblr.py
index 63c20310d..9ead13a91 100644
--- a/youtube_dl/extractor/tumblr.py
+++ b/youtube_dl/extractor/tumblr.py
@@ -5,6 +5,7 @@ import re
from .common import InfoExtractor
from .pornhub import PornHubIE
+from .vimeo import VimeoIE
class TumblrIE(InfoExtractor):
@@ -40,6 +41,17 @@ class TumblrIE(InfoExtractor):
'timestamp': 1430931613,
},
'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):
@@ -60,6 +72,10 @@ class TumblrIE(InfoExtractor):
if pornhub_url:
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(
r'src=\'(https?://www\.tumblr\.com/video/[^\']+)\'',
webpage, 'iframe url')