aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-04-23 17:57:49 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-04-23 18:10:18 +0800
commitf8610ba1ca4705dcae5c45c5ac66a99b174ebed3 (patch)
tree2b39b6afd7a24e495a3a04b8dde8a1d143f8babf
parentc99f4098c4c94a3588e5f59c75dda58923c1c823 (diff)
[ustream] Fix extraction (closes #3998)
-rw-r--r--youtube_dl/extractor/ustream.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ustream.py b/youtube_dl/extractor/ustream.py
index 68d03b999..d559e228a 100644
--- a/youtube_dl/extractor/ustream.py
+++ b/youtube_dl/extractor/ustream.py
@@ -1,5 +1,6 @@
from __future__ import unicode_literals
+import json
import re
from .common import InfoExtractor
@@ -39,7 +40,15 @@ class UstreamIE(InfoExtractor):
desktop_url = 'http://www.ustream.tv/recorded/' + desktop_video_id
return self.url_result(desktop_url, 'Ustream')
- video_url = 'http://tcdn.ustream.tv/video/%s' % video_id
+ params = self._download_json(
+ 'http://cdngw.ustream.tv/rgwjson/Viewer.getVideo/' + json.dumps({
+ 'brandId': 1,
+ 'videoId': int(video_id),
+ 'autoplay': False,
+ }), video_id)
+
+ video_url = params['flv']
+
webpage = self._download_webpage(url, video_id)
self.report_extraction(video_id)