projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2989501
)
[redtube] Add support for thumbnails
author
Mike Col
<MikeCol@gmx.net>
Tue, 21 Jan 2014 13:12:59 +0000
(14:12 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Tue, 21 Jan 2014 13:14:55 +0000
(14:14 +0100)
Signed-off-by: Philipp Hagemeister <phihag@phihag.de>
youtube_dl/extractor/redtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/redtube.py
b/youtube_dl/extractor/redtube.py
index 5c4cd20687a5745982bdce0d43417297bca0bc28..ca2e0aae7d2f315254ca899e6fd01a3776753814 100644
(file)
--- a/
youtube_dl/extractor/redtube.py
+++ b/
youtube_dl/extractor/redtube.py
@@
-33,6
+33,10
@@
class RedTubeIE(InfoExtractor):
r'<h1 class="videoTitle[^"]*">(.+?)</h1>',
webpage, u'title')
+ video_thumbnail = self._html_search_regex(
+ r'playerInnerHTML.+?<img\s+src="(.+?)"',
+ webpage, u'thumbnail', fatal=False)
+
# No self-labeling, but they describe themselves as
# "Home of Videos Porno"
age_limit = 18
@@
-42,5
+46,6
@@
class RedTubeIE(InfoExtractor):
'url': video_url,
'ext': video_extension,
'title': video_title,
+ 'thumbnail': video_thumbnail,
'age_limit': age_limit,
}