aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/ted.py
diff options
context:
space:
mode:
authorminusf <minusf@gmail.com>2015-02-20 18:24:20 +0100
committerminusf <minusf@gmail.com>2015-02-20 18:24:20 +0100
commit1bd838608fda2da789c8991ec7fc194ed5ec0a1f (patch)
tree5dd25ea901f635c376d0955af1543c91ddf4fd76 /youtube_dl/extractor/ted.py
parent50efb383f01071fe5ae6ec6da2557031da54abde (diff)
prefer 'code' to 'uri' if present
Diffstat (limited to 'youtube_dl/extractor/ted.py')
-rw-r--r--youtube_dl/extractor/ted.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py
index 10b3b706a..5e5322974 100644
--- a/youtube_dl/extractor/ted.py
+++ b/youtube_dl/extractor/ted.py
@@ -134,9 +134,13 @@ class TEDIE(SubtitlesInfoExtractor):
if talk_info.get('external') is not None:
self.to_screen('Found video from %s' % talk_info['external']['service'])
+ if 'code' in talk_info['external']:
+ ext_url = talk_info['external']['code']
+ else:
+ ext_url = talk_info['external']['uri']
return {
'_type': 'url',
- 'url': talk_info['external']['uri'],
+ 'url': ext_url,
}
formats = [{