mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[ted] Add support for external videos (fixes #3948)
This commit is contained in:
parent
62a164e713
commit
a72cbfacf0
1 changed files with 23 additions and 0 deletions
|
@ -65,6 +65,22 @@ class TEDIE(SubtitlesInfoExtractor):
|
|||
'title': 'Who are the hackers?',
|
||||
},
|
||||
'playlist_mincount': 6,
|
||||
}, {
|
||||
# contains a youtube video
|
||||
'url': 'https://www.ted.com/talks/douglas_adams_parrots_the_universe_and_everything',
|
||||
'add_ie': ['Youtube'],
|
||||
'info_dict': {
|
||||
'id': '_ZG8HBuDjgc',
|
||||
'ext': 'mp4',
|
||||
'title': 'Douglas Adams: Parrots the Universe and Everything',
|
||||
'description': 'md5:01ad1e199c49ac640cb1196c0e9016af',
|
||||
'uploader': 'University of California Television (UCTV)',
|
||||
'uploader_id': 'UCtelevision',
|
||||
'upload_date': '20080522',
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
},
|
||||
}]
|
||||
|
||||
_NATIVE_FORMATS = {
|
||||
|
@ -114,6 +130,13 @@ def _talk_info(self, url, video_name):
|
|||
|
||||
talk_info = self._extract_info(webpage)['talks'][0]
|
||||
|
||||
if talk_info.get('external') is not None:
|
||||
self.to_screen('Found video from %s' % talk_info['external']['service'])
|
||||
return {
|
||||
'_type': 'url',
|
||||
'url': talk_info['external']['uri'],
|
||||
}
|
||||
|
||||
formats = [{
|
||||
'url': format_url,
|
||||
'format_id': format_id,
|
||||
|
|
Loading…
Reference in a new issue