Fixed extractor and added duration
Fixed video_url added duration to info dict
This commit is contained in:
parent
435e382423
commit
fb106c2091
@ -27,17 +27,29 @@ class YourPornIE(InfoExtractor):
|
|||||||
self._search_regex(
|
self._search_regex(
|
||||||
r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info',
|
r'data-vnfo=(["\'])(?P<data>{.+?})\1', webpage, 'data info',
|
||||||
group='data'),
|
group='data'),
|
||||||
video_id)[video_id]).replace('/cdn/', '/cdn3/')
|
video_id)[video_id]).replace('/cdn/', '/cdn4/')
|
||||||
|
|
||||||
title = (self._search_regex(
|
title = (self._search_regex(
|
||||||
r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
|
r'<[^>]+\bclass=["\']PostEditTA[^>]+>([^<]+)', webpage, 'title',
|
||||||
default=None) or self._og_search_description(webpage)).strip()
|
default=None) or self._og_search_description(webpage)).strip()
|
||||||
|
if '#' in title:
|
||||||
|
title = title[0:title.index('#')].strip()
|
||||||
thumbnail = self._og_search_thumbnail(webpage)
|
thumbnail = self._og_search_thumbnail(webpage)
|
||||||
|
durationraw = self._search_regex(r'Video Info -> duration:<b>([0-9:]+)</b>',
|
||||||
|
webpage, 'duration')
|
||||||
|
if len(durationraw.split(":")) == 3:
|
||||||
|
duration = int((durationraw.split(":")[0])) * 3600 + \
|
||||||
|
int((durationraw.split(":")[1])) * 60 + int((durationraw.split(":")[2]))
|
||||||
|
elif len(durationraw.split(":")) == 2:
|
||||||
|
duration = int((durationraw.split(":")[0])) * 60 + int((durationraw.split(":")[1]))
|
||||||
|
else:
|
||||||
|
duration = int((durationraw.split(":")[1]))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'url': video_url,
|
'url': video_url,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
'duration': duration,
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'age_limit': 18
|
'age_limit': 18
|
||||||
}
|
}
|
||||||
|
BIN
youtube_dl/extractor/yourporn.pyc
Normal file
BIN
youtube_dl/extractor/yourporn.pyc
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user