[generic] Add support for xhamster embeds

This commit is contained in:
Sergey M․ 2015-06-21 23:11:25 +06:00
parent 0bbba43ed0
commit 2bb5b6d0a1
2 changed files with 12 additions and 0 deletions

View file

@ -149,6 +149,12 @@ class XHamsterEmbedIE(InfoExtractor):
}
}
@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)