瀏覽代碼

[senate] Simplify

There isn't any problem if the 'formats' field only has one element
Jaime Marquínez Ferrándiz 10 年之前
父節點
當前提交
5c1e6f69c4
共有 1 個文件被更改,包括 2 次插入8 次删除
  1. 2 8
      youtube_dl/extractor/senateisvp.py

+ 2 - 8
youtube_dl/extractor/senateisvp.py

@@ -133,15 +133,9 @@ class SenateISVPIE(InfoExtractor):
 
             self._sort_formats(formats)
 
-        info_dict = {
+        return {
             'id': video_id,
             'title': title,
+            'formats': formats,
             'thumbnail': thumbnail,
         }
-
-        if len(formats) >= 1:
-            info_dict.update({'formats': formats})
-        else:
-            info_dict.update(formats[0])
-
-        return info_dict