0
0
Fork 0

[xvideos] Add video duration

main
Sander 2017-04-23 23:49:41 +02:00 committed by Sergey M․
parent b07ea5eaec
commit 13081db1f5
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ from ..utils import (
clean_html,
ExtractorError,
determine_ext,
parse_duration,
)
@ -20,6 +21,7 @@ class XVideosIE(InfoExtractor):
'id': '4588838',
'ext': 'mp4',
'title': 'Biker Takes his Girl',
'duration': 120,
'age_limit': 18,
}
}
@ -36,6 +38,8 @@ class XVideosIE(InfoExtractor):
r'<title>(.*?)\s+-\s+XVID', webpage, 'title')
video_thumbnail = self._search_regex(
r'url_bigthumb=(.+?)&amp', webpage, 'thumbnail', fatal=False)
video_duration = parse_duration(self._search_regex(
r'<span class="duration">.*?(\d[^<]+)', webpage, 'duration', fatal=False))
formats = []
@ -67,6 +71,7 @@ class XVideosIE(InfoExtractor):
'id': video_id,
'formats': formats,
'title': video_title,
'duration': video_duration,
'thumbnail': video_thumbnail,
'age_limit': 18,
}