From 43ad0eb8f203c87f2a5b150576b49d0b8b161c20 Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 18 Oct 2015 10:05:53 +0200 Subject: [PATCH] [youporn] Added uploader and date --- youtube_dl/extractor/youporn.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/youporn.py b/youtube_dl/extractor/youporn.py index 31bc661e5..811138547 100644 --- a/youtube_dl/extractor/youporn.py +++ b/youtube_dl/extractor/youporn.py @@ -29,6 +29,9 @@ class YouPornIE(InfoExtractor): 'ext': 'mp4', 'title': 'Sex Ed: Is It Safe To Masturbate Daily?', 'description': 'Watch Sex Ed: Is It Safe To Masturbate Daily? at YouPorn.com - YouPorn is the biggest free porn tube site on the net!', + 'uploader': 'Ask Dan And Jennifer', + 'thumbnail': 'http://cdn5.image.youporn.phncdn.com/201012/17/505835/640x480/8/sex-ed-is-it-safe-to-masturbate-daily-8.jpg', + 'date': 'December 21, 2010', 'age_limit': 18, } } @@ -46,8 +49,10 @@ class YouPornIE(InfoExtractor): self.report_extraction(video_id) try: video_title = self._html_search_regex(r'page_params.video_title = \'(.+?)\';', webpage, 'video URL') - video_description = self._html_search_regex(r'', webpage, 'video DESC') - video_thumbnail = self._html_search_regex(r'By:\n]+\">(.+?)", webpage, 'video UPLOADER') + video_date = self._html_search_regex(r"
\n (.+?)\n
", webpage, 'video DATE') except KeyError: raise ExtractorError('Missing JSON parameter: ' + sys.exc_info()[1]) @@ -99,6 +104,8 @@ class YouPornIE(InfoExtractor): 'title': video_title, 'description': video_description, 'thumbnail': video_thumbnail, + 'uploader': video_uploader, + 'date': video_date, 'age_limit': age_limit, 'formats': formats, }