X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fliveleak.py;h=29fba5f30b0cc4633dbc978e886c62eab0d4ac81;hb=f745403b5b448c170710256a61b8505e09e77674;hp=857edfde263196d9bf2811568cc9f9de90eed92b;hpb=ac9ed061ec08ad360a0422ddb68060bdcc72baa2;p=youtube-dl diff --git a/youtube_dl/extractor/liveleak.py b/youtube_dl/extractor/liveleak.py index 857edfde2..29fba5f30 100644 --- a/youtube_dl/extractor/liveleak.py +++ b/youtube_dl/extractor/liveleak.py @@ -47,12 +47,20 @@ class LiveLeakIE(InfoExtractor): 'info_dict': { 'id': '801_1409392012', 'ext': 'mp4', - 'description': "Happened on 27.7.2014. \r\nAt 0:53 you can see people still swimming at near beach.", + 'description': 'Happened on 27.7.2014. \r\nAt 0:53 you can see people still swimming at near beach.', 'uploader': 'bony333', 'title': 'Crazy Hungarian tourist films close call waterspout in Croatia' } }] + @staticmethod + def _extract_url(webpage): + mobj = re.search( + r']+src="https?://(?:\w+\.)?liveleak\.com/ll_embed\?(?:.*?)i=(?P[\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)