From 9fd24e3a227a059eed07b679dac858e5bd747123 Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 14 Jun 2015 21:50:03 +0200 Subject: [PATCH 1/2] LiveLeak: support more original videos some (old?) videos use ...mp4.h264_270p.mp4... instead of ...mp4.h264_base.mp4... This is an addition to #4768 --- youtube_dl/extractor/liveleak.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/liveleak.py b/youtube_dl/extractor/liveleak.py index 35822067f..431f2e85d 100644 --- a/youtube_dl/extractor/liveleak.py +++ b/youtube_dl/extractor/liveleak.py @@ -85,7 +85,7 @@ def _real_extract(self, url): 'url': s['file'], } for i, s in enumerate(sources)] for i, s in enumerate(sources): - orig_url = s['file'].replace('.h264_base.mp4', '') + orig_url = re.sub(r'.h264_.+\.mp4', '', s['file']) if s['file'] != orig_url: formats.append({ 'format_id': 'original-%s' % i, From 8f75761f24f9f2599efe100b5a094182af6403d0 Mon Sep 17 00:00:00 2001 From: jomo Date: Sun, 14 Jun 2015 22:41:44 +0200 Subject: [PATCH 2/2] LiveLak: add test for URLs with 'h264_270p' --- youtube_dl/extractor/liveleak.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/youtube_dl/extractor/liveleak.py b/youtube_dl/extractor/liveleak.py index 431f2e85d..c658cc92b 100644 --- a/youtube_dl/extractor/liveleak.py +++ b/youtube_dl/extractor/liveleak.py @@ -40,6 +40,16 @@ class LiveLeakIE(InfoExtractor): 'title': 'Man is Fatally Struck by Reckless Car While Packing up a Moving Truck', 'age_limit': 18, } + }, { + 'url': 'http://www.liveleak.com/view?i=801_1409392012', + 'md5': '0b3bec2d888c20728ca2ad3642f0ef15', + '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.", + 'uploader': 'bony333', + 'title': 'Crazy Hungarian tourist films close call waterspout in Croatia' + } }] def _real_extract(self, url):