from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( compat_urllib_parse, ExtractorError, clean_html, ) class XVideosIE(InfoExtractor): _VALID_URL = r'^(?:https?://)?(?:www\.)?xvideos\.com/video([0-9]+)(?:.*)' _TEST = { 'url': 'http://www.xvideos.com/video4588838/biker_takes_his_girl', 'md5': '4b46ae6ea5e6e9086e714d883313c0c9', 'info_dict': { 'id': '4588838', 'ext': 'flv', 'title': 'Biker Takes his Girl', 'age_limit': 18, } } def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group(1) webpage = self._download_webpage(url, video_id) self.report_extraction(video_id) mobj = re.search(r'