Browse Source

prefer 'code' to 'uri' if present

totalwebcasting
minusf 10 years ago
parent
commit
1bd838608f
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      youtube_dl/extractor/ted.py

+ 5
- 1
youtube_dl/extractor/ted.py View File

@ -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 = [{


Loading…
Cancel
Save