projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c99f409
)
[ustream] Fix extraction (closes #3998)
author
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 23 Apr 2015 09:57:49 +0000
(17:57 +0800)
committer
Yen Chi Hsuan
<yan12125@gmail.com>
Thu, 23 Apr 2015 10:10:18 +0000
(18:10 +0800)
youtube_dl/extractor/ustream.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ustream.py
b/youtube_dl/extractor/ustream.py
index 68d03b99905cce848eb38fde8b6d8e643c548105..d559e228a9afc81f5c6ddbc7fafe195599de265c 100644
(file)
--- a/
youtube_dl/extractor/ustream.py
+++ b/
youtube_dl/extractor/ustream.py
@@
-1,5
+1,6
@@
from __future__ import unicode_literals
from __future__ import unicode_literals
+import json
import re
from .common import InfoExtractor
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')
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)
webpage = self._download_webpage(url, video_id)
self.report_extraction(video_id)