aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/liveleak.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-15 17:23:55 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-15 17:23:55 +0800
commit66d40ae3a5b5f68b551831714ae693931ec6cffa (patch)
tree7a22c414c2879ba011e188ba1ad6194bead45832 /youtube_dl/extractor/liveleak.py
parente6da9240d44774495a7ae0f2780bd42e4d2628f5 (diff)
parentb8f67449ecafa76d4d925c7ad72f9c8f8338aba7 (diff)
Merge pull request #9041 from kasper93/master
[generic] Add support for LiveLeak embeds
Diffstat (limited to 'youtube_dl/extractor/liveleak.py')
-rw-r--r--youtube_dl/extractor/liveleak.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/youtube_dl/extractor/liveleak.py b/youtube_dl/extractor/liveleak.py
index 4684994e1..29fba5f30 100644
--- a/youtube_dl/extractor/liveleak.py
+++ b/youtube_dl/extractor/liveleak.py
@@ -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)