projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50efb38
)
prefer 'code' to 'uri' if present
author
minusf
<minusf@gmail.com>
Fri, 20 Feb 2015 17:24:20 +0000
(18:24 +0100)
committer
minusf
<minusf@gmail.com>
Fri, 20 Feb 2015 17:24:20 +0000
(18:24 +0100)
youtube_dl/extractor/ted.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/ted.py
b/youtube_dl/extractor/ted.py
index 10b3b706a9c82ef8398d408a948e72b6c52b31c3..5e53229740315a56ccb992be9b6b0d7e5e6cf66e 100644
(file)
--- 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 = [{