aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/infoq.py
diff options
context:
space:
mode:
authorKai Weber <kai.weber@brands4friends.de>2014-04-20 01:10:30 +0200
committerKai Weber <kai.weber@brands4friends.de>2014-04-20 01:10:30 +0200
commit7560096db5ce0002b3cf3f3bcbbb53ef05e6fb13 (patch)
tree72ac39fecc7ced4bcec1a2f3319ebd308c0fdcae /youtube_dl/extractor/infoq.py
parent282cb9c7ba918904bfa6f58a5a1bbf44938c76ba (diff)
[infoq] Simplify playpath calculation
Diffstat (limited to 'youtube_dl/extractor/infoq.py')
-rw-r--r--youtube_dl/extractor/infoq.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/youtube_dl/extractor/infoq.py b/youtube_dl/extractor/infoq.py
index 55f7608b5..65f0b76cb 100644
--- a/youtube_dl/extractor/infoq.py
+++ b/youtube_dl/extractor/infoq.py
@@ -35,9 +35,13 @@ class InfoQIE(InfoExtractor):
video_title = self._html_search_regex(r'<title>(.*?)</title>', webpage, 'title')
video_description = self._html_search_meta('description', webpage, 'description')
+ # The server URL is hardcoded
video_url = 'rtmpe://video.infoq.com/cfx/st/'
- base64playpath = self._search_regex(r"jsclassref = '([^']*)'", webpage, 'jsclassref')
- playpath = 'mp4:' + base64.b64decode(base64playpath).decode('utf-8')
+
+ # Extract video URL
+ encoded_id = self._search_regex(r"jsclassref ?= ?'([^']*)'", webpage, 'encoded id')
+ real_id = compat_urllib_parse.unquote(base64.b64decode(encoded_id.encode('ascii')).decode('utf-8'))
+ playpath = 'mp4:' + real_id
video_filename = playpath.split('/')[-1]
video_id, extension = video_filename.split('.')