From: Sergey M․ Date: Fri, 12 Jun 2015 21:39:14 +0000 (+0600) Subject: [tumblr] Add support for pornhub embeds (Closes #5963) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=78e2b74bb945dc7f1724f7486405dd523486d634;p=youtube-dl [tumblr] Add support for pornhub embeds (Closes #5963) --- diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index f683760e4..f6b984300 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1322,6 +1322,7 @@ class GenericIE(InfoExtractor): if sportbox_urls: return _playlist_from_matches(sportbox_urls, ie='SportBoxEmbed') + # Look for embedded PornHub player pornhub_url = PornHubIE._extract_url(webpage) if pornhub_url: return self.url_result(pornhub_url, 'PornHub') diff --git a/youtube_dl/extractor/tumblr.py b/youtube_dl/extractor/tumblr.py index e6218808f..63c20310d 100644 --- a/youtube_dl/extractor/tumblr.py +++ b/youtube_dl/extractor/tumblr.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import re from .common import InfoExtractor +from .pornhub import PornHubIE class TumblrIE(InfoExtractor): @@ -55,6 +56,10 @@ class TumblrIE(InfoExtractor): if vid_me_embed_url is not None: return self.url_result(vid_me_embed_url, 'Vidme') + pornhub_url = PornHubIE._extract_url(webpage) + if pornhub_url: + return self.url_result(pornhub_url, 'PornHub') + iframe_url = self._search_regex( r'src=\'(https?://www\.tumblr\.com/video/[^\']+)\'', webpage, 'iframe url')