[generic] Add support for LiveLeak embeds

This commit is contained in:
Kacper Michajłow 2016-03-31 20:42:55 +02:00
parent 75af5d59ae
commit b8f67449ec
2 changed files with 26 additions and 0 deletions

View file

@ -53,6 +53,14 @@ class LiveLeakIE(InfoExtractor):
}
}]
@staticmethod
def _extract_url(webpage):
mobj = re.search(
r'<iframe[^>]+src="https?://(?:\w+\.)?liveleak\.com/ll_embed\?(?:.*?)i=(?P<id>[\w_]+)(?:.*)',
webpage)
if mobj:
return 'http://www.liveleak.com/view?i=%s' % mobj.group('id')
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)