[tumblr] Add support for pornhub embeds (Closes #5963)
authorSergey M․ <dstftw@gmail.com>
Fri, 12 Jun 2015 21:39:14 +0000 (03:39 +0600)
committerSergey M․ <dstftw@gmail.com>
Fri, 12 Jun 2015 21:39:14 +0000 (03:39 +0600)
youtube_dl/extractor/generic.py
youtube_dl/extractor/tumblr.py

index f683760e4b9ca6e20644b3c98b246a3d9a2a6c72..f6b984300d1e09e9f55a9d618e3966d7778602e9 100644 (file)
@@ -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')
index e6218808f29116e8d2d0d39f2a61342eef1bc823..63c20310d8e54f98f2c19bd23f9ebca947ae23d3 100644 (file)
@@ -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')