mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
Merge branch 'minusf-TED_code'
This commit is contained in:
commit
ab9d02f53b
|
@ -83,6 +83,22 @@ class TEDIE(SubtitlesInfoExtractor):
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
# YouTube video
|
||||||
|
'url': 'http://www.ted.com/talks/jeffrey_kluger_the_sibling_bond',
|
||||||
|
'add_ie': ['Youtube'],
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'aFBIPO-P7LM',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'The hidden power of siblings: Jeff Kluger at TEDxAsheville',
|
||||||
|
'description': 'md5:3d7a4f50d95ca5dd67104e2a20f43fe1',
|
||||||
|
'uploader': 'TEDx Talks',
|
||||||
|
'uploader_id': 'TEDxTalks',
|
||||||
|
'upload_date': '20111216',
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
_NATIVE_FORMATS = {
|
_NATIVE_FORMATS = {
|
||||||
|
@ -132,11 +148,16 @@ class TEDIE(SubtitlesInfoExtractor):
|
||||||
|
|
||||||
talk_info = self._extract_info(webpage)['talks'][0]
|
talk_info = self._extract_info(webpage)['talks'][0]
|
||||||
|
|
||||||
if talk_info.get('external') is not None:
|
external = talk_info.get('external')
|
||||||
self.to_screen('Found video from %s' % talk_info['external']['service'])
|
if external:
|
||||||
|
service = external['service']
|
||||||
|
self.to_screen('Found video from %s' % service)
|
||||||
|
ext_url = None
|
||||||
|
if service.lower() == 'youtube':
|
||||||
|
ext_url = external.get('code')
|
||||||
return {
|
return {
|
||||||
'_type': 'url',
|
'_type': 'url',
|
||||||
'url': talk_info['external']['uri'],
|
'url': ext_url or external['uri'],
|
||||||
}
|
}
|
||||||
|
|
||||||
formats = [{
|
formats = [{
|
||||||
|
|
Loading…
Reference in a new issue