Преглед изворни кода

[ted] Add 'http://' to the thumbnail url if it's missing

Jaime Marquínez Ferrándiz пре 11 година
родитељ
комит
b6c1ceccc2
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      youtube_dl/extractor/ted.py

+ 4 - 1
youtube_dl/extractor/ted.py

@@ -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,