1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-26 20:22:14 +00:00

[tumblr] Add support for pornhub embeds (Closes #5963)

This commit is contained in:
Sergey M․ 2015-06-13 03:39:14 +06:00
parent 65d161c480
commit 78e2b74bb9
2 changed files with 6 additions and 0 deletions

View file

@ -1322,6 +1322,7 @@ class GenericIE(InfoExtractor):
if sportbox_urls: if sportbox_urls:
return _playlist_from_matches(sportbox_urls, ie='SportBoxEmbed') return _playlist_from_matches(sportbox_urls, ie='SportBoxEmbed')
# Look for embedded PornHub player
pornhub_url = PornHubIE._extract_url(webpage) pornhub_url = PornHubIE._extract_url(webpage)
if pornhub_url: if pornhub_url:
return self.url_result(pornhub_url, 'PornHub') return self.url_result(pornhub_url, 'PornHub')

View file

@ -4,6 +4,7 @@ from __future__ import unicode_literals
import re import re
from .common import InfoExtractor from .common import InfoExtractor
from .pornhub import PornHubIE
class TumblrIE(InfoExtractor): class TumblrIE(InfoExtractor):
@ -55,6 +56,10 @@ class TumblrIE(InfoExtractor):
if vid_me_embed_url is not None: if vid_me_embed_url is not None:
return self.url_result(vid_me_embed_url, 'Vidme') 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( 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')