aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/generic.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-05-14 23:58:25 +0600
committerSergey M․ <dstftw@gmail.com>2016-05-14 23:58:25 +0600
commit6f41b2bcf16899f8c3f0ea705b2914cf1ae668a3 (patch)
tree0c3e8d573469931d51107d92e024d3b6fa79ca09 /youtube_dl/extractor/generic.py
parentcda6d47aad106a825f837c7a583fffc783c4b63b (diff)
[extractor/generic] Improve 3qsdn embeds support (Closes #9453)
Diffstat (limited to 'youtube_dl/extractor/generic.py')
-rw-r--r--youtube_dl/extractor/generic.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py
index b48ccfc97..a6b1e23e3 100644
--- a/youtube_dl/extractor/generic.py
+++ b/youtube_dl/extractor/generic.py
@@ -1428,7 +1428,8 @@ class GenericIE(InfoExtractor):
# Site Name | Video Title
# Video Title - Tagline | Site Name
# and so on and so forth; it's just not practical
- video_title = self._html_search_regex(
+ video_title = self._og_search_title(
+ webpage, default=None) or self._html_search_regex(
r'(?s)<title>(.*?)</title>', webpage, 'video title',
default='video')
@@ -1446,6 +1447,9 @@ class GenericIE(InfoExtractor):
video_uploader = self._search_regex(
r'^(?:https?://)?([^/]*)/.*', url, 'video uploader')
+ video_description = self._og_search_description(webpage, default=None)
+ video_thumbnail = self._og_search_thumbnail(webpage, default=None)
+
# Helper method
def _playlist_from_matches(matches, getter=None, ie=None):
urlrs = orderedSet(
@@ -1987,7 +1991,15 @@ class GenericIE(InfoExtractor):
# Look for 3Q SDN embeds
threeqsdn_url = ThreeQSDNIE._extract_url(webpage)
if threeqsdn_url:
- return self.url_result(self._proto_relative_url(threeqsdn_url), ThreeQSDNIE.ie_key())
+ return {
+ '_type': 'url_transparent',
+ 'ie_key': ThreeQSDNIE.ie_key(),
+ 'url': self._proto_relative_url(threeqsdn_url),
+ 'title': video_title,
+ 'description': video_description,
+ 'thumbnail': video_thumbnail,
+ 'uploader': video_uploader,
+ }
def check_video(vurl):
if YoutubeIE.suitable(vurl):