clean_html,
ExtractorError,
determine_ext,
+ parse_duration,
)
_VALID_URL = r'https?://(?:www\.)?xvideos\.com/video(?P<id>[0-9]+)(?:.*)'
_TEST = {
'url': 'http://www.xvideos.com/video4588838/biker_takes_his_girl',
- 'md5': '4b46ae6ea5e6e9086e714d883313c0c9',
+ 'md5': '14cea69fcb84db54293b1e971466c2e1',
'info_dict': {
'id': '4588838',
- 'ext': 'flv',
+ 'ext': 'mp4',
'title': 'Biker Takes his Girl',
+ 'duration': 120,
'age_limit': 18,
}
}
r'<title>(.*?)\s+-\s+XVID', webpage, 'title')
video_thumbnail = self._search_regex(
r'url_bigthumb=(.+?)&', webpage, 'thumbnail', fatal=False)
+ video_duration = parse_duration(self._search_regex(
+ r'<span class="duration">.*?(\d[^<]+)', webpage, 'duration', fatal=False))
formats = []
'id': video_id,
'formats': formats,
'title': video_title,
+ 'duration': video_duration,
'thumbnail': video_thumbnail,
'age_limit': 18,
}