aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/ted.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-10-15 12:24:11 +0200
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-10-15 12:24:11 +0200
commita72cbfacf067fc5539b93152d2917f30f44b88c4 (patch)
treeca3cefd1070e763cc06f64f4a3f9fc40dc8b6d1e /youtube_dl/extractor/ted.py
parent62a164e71372f126d6d70997adf74fcc4e086b58 (diff)
[ted] Add support for external videos (fixes #3948)
Diffstat (limited to 'youtube_dl/extractor/ted.py')
-rw-r--r--youtube_dl/extractor/ted.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/youtube_dl/extractor/ted.py b/youtube_dl/extractor/ted.py
index d5e28efad..cd4af96fd 100644
--- a/youtube_dl/extractor/ted.py
+++ b/youtube_dl/extractor/ted.py
@@ -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 @@ class TEDIE(SubtitlesInfoExtractor):
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,