]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[ted] Add 'http://' to the thumbnail url if it's missing
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 16 Mar 2014 10:24:11 +0000 (11:24 +0100)
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>
Sun, 16 Mar 2014 10:24:11 +0000 (11:24 +0100)
youtube_dl/extractor/ted.py

index cf10be2d02cb5bc538e2561eee2c3fb5e47643c6..3968b718e9ad7a62664c3224452e6d57dce042e0 100644 (file)
@@ -93,11 +93,14 @@ class TEDIE(SubtitlesInfoExtractor):
             self._list_available_subtitles(video_id, talk_info)
             return
 
+        thumbnail = talk_info['thumb']
+        if not thumbnail.startswith('http'):
+            thumbnail = 'http://' + thumbnail
         return {
             'id': video_id,
             'title': talk_info['title'],
             'uploader': talk_info['speaker'],
-            'thumbnail': talk_info['thumb'],
+            'thumbnail': thumbnail,
             'description': self._og_search_description(webpage),
             'subtitles': video_subtitles,
             'formats': formats,