projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f58db8
)
[liveleak] Modernize
author
Philipp Hagemeister
<phihag@phihag.de>
Fri, 23 Jan 2015 16:09:26 +0000
(17:09 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Fri, 23 Jan 2015 16:09:26 +0000
(17:09 +0100)
youtube_dl/extractor/liveleak.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/liveleak.py
b/youtube_dl/extractor/liveleak.py
index b04be1e8cfda94addca26a1d1e3731ce61519dc1..e56a4d6b1de1c6811b3395a8f0869e86f51d9c77 100644
(file)
--- a/
youtube_dl/extractor/liveleak.py
+++ b/
youtube_dl/extractor/liveleak.py
@@
-8,7
+8,7
@@
from ..utils import int_or_none
class LiveLeakIE(InfoExtractor):
class LiveLeakIE(InfoExtractor):
- _VALID_URL = r'
^(?:http://)?(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<video_
id>[\w_]+)(?:.*)'
+ _VALID_URL = r'
https?://(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<
id>[\w_]+)(?:.*)'
_TESTS = [{
'url': 'http://www.liveleak.com/view?i=757_1364311680',
'md5': '0813c2430bea7a46bf13acf3406992f4',
_TESTS = [{
'url': 'http://www.liveleak.com/view?i=757_1364311680',
'md5': '0813c2430bea7a46bf13acf3406992f4',
@@
-43,8
+43,7
@@
class LiveLeakIE(InfoExtractor):
}]
def _real_extract(self, url):
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('video_id')
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
video_title = self._og_search_title(webpage).replace('LiveLeak.com -', '').strip()
webpage = self._download_webpage(url, video_id)
video_title = self._og_search_title(webpage).replace('LiveLeak.com -', '').strip()