summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-10-27 02:32:44 +0100
committerPhilipp Hagemeister <[email protected]>2014-10-27 02:32:44 +0100
commitb0fb6d4db1ed19dfa3a38ee5fd1d38e6227c3d93 (patch)
tree2a7bd50e0f6533d8657a38c95e2be3c1ab077201
parent81515ad9f674597e0d41be6acfcb8592f2230f32 (diff)
downloadyoutube-dl-b0fb6d4db1ed19dfa3a38ee5fd1d38e6227c3d93.tar.gz
youtube-dl-b0fb6d4db1ed19dfa3a38ee5fd1d38e6227c3d93.zip
[ku6] Modernize
-rw-r--r--youtube_dl/extractor/ku6.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/youtube_dl/extractor/ku6.py b/youtube_dl/extractor/ku6.py
index 484239b19..89013e522 100644
--- a/youtube_dl/extractor/ku6.py
+++ b/youtube_dl/extractor/ku6.py
@@ -1,7 +1,5 @@
from __future__ import unicode_literals
-import re
-
from .common import InfoExtractor
@@ -18,11 +16,11 @@ class Ku6IE(InfoExtractor):
}
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
-
+ video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- title = self._search_regex(r'<h1 title=.*>(.*?)</h1>', webpage, 'title')
+
+ title = self._html_search_regex(
+ r'<h1 title=.*>(.*?)</h1>', webpage, 'title')
dataUrl = 'http://v.ku6.com/fetchVideo4Player/%s.html' % video_id
jsonData = self._download_json(dataUrl, video_id)
downloadUrl = jsonData['data']['f']