class XHamsterIE(InfoExtractor):
- _DOMAINS = r'(?:xhamster\.(?:com|one|desi)|xhms\.pro|xhamster\d+\.com|xhday\.com)'
+ _DOMAINS = r'(?:xhamster\.(?:com|one|desi)|xhms\.pro|xhamster\d+\.com|xhday\.com|xhvid\.com)'
_VALID_URL = r'''(?x)
https?://
(?:.+?\.)?%s/
}, {
'url': 'https://xhday.com/videos/strapless-threesome-xhh7yVf',
'only_matching': True,
+ }, {
+ 'url': 'https://xhvid.com/videos/lk-mm-xhc6wn6',
+ 'only_matching': True,
}]
def _real_extract(self, url):
'Referer': standard_url,
},
})
- self._sort_formats(formats)
categories_list = video.get('categories')
if isinstance(categories_list, list):
'url': video_url,
})
- self._sort_formats(formats)
-
# Only a few videos have an description
mobj = re.search(r'<span>Description: </span>([^<]+)', webpage)
description = mobj.group(1) if mobj else None
class XHamsterEmbedIE(InfoExtractor):
_VALID_URL = r'https?://(?:.+?\.)?%s/xembed\.php\?video=(?P<id>\d+)' % XHamsterIE._DOMAINS
+ _EMBED_REGEX = [r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?xhamster\.com/xembed\.php\?video=\d+)\1']
_TEST = {
'url': 'http://xhamster.com/xembed.php?video=3328539',
'info_dict': {
}
}
- @staticmethod
- def _extract_urls(webpage):
- return [url for _, url in re.findall(
- r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//(?:www\.)?xhamster\.com/xembed\.php\?video=\d+)\1',
- webpage)]
-
def _real_extract(self, url):
video_id = self._match_id(url)
}, {
'url': 'https://xhday.com/users/mobhunter',
'only_matching': True,
+ }, {
+ 'url': 'https://xhvid.com/users/pelushe21',
+ 'only_matching': True,
}]
def _entries(self, user_id):