diff options
author | Yen Chi Hsuan <yan12125@gmail.com> | 2015-08-13 12:56:12 +0800 |
---|---|---|
committer | Yen Chi Hsuan <yan12125@gmail.com> | 2015-08-13 12:56:12 +0800 |
commit | 28479149ccf3425e6a6e35d3a155f6802629728a (patch) | |
tree | 15b25900b96b9147a2c74dd1192645700df672b2 /youtube_dl/extractor | |
parent | 237c03c8eaa4da1713a635e87f98ac14430b35cb (diff) |
[theplatform] Fallback to hardcoded releaseUrl if not available
Fixes #6546.
Not adding a test case as test_NBC has the same problem.
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/theplatform.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py index 83d833e30..0643eccaf 100644 --- a/youtube_dl/extractor/theplatform.py +++ b/youtube_dl/extractor/theplatform.py @@ -108,7 +108,11 @@ class ThePlatformIE(InfoExtractor): config_url = config_url.replace('swf/', 'config/') config_url = config_url.replace('onsite/', 'onsite/config/') config = self._download_json(config_url, video_id, 'Downloading config') - smil_url = config['releaseUrl'] + '&format=SMIL&formats=MPEG4&manifest=f4m' + if 'releaseUrl' in config: + release_url = config['releaseUrl'] + else: + release_url = 'http://link.theplatform.com/s/%s?mbr=true' % path + smil_url = release_url + '&format=SMIL&formats=MPEG4&manifest=f4m' else: smil_url = 'http://link.theplatform.com/s/%s/meta.smil?format=smil&mbr=true' % path |