浏览代码

[liveleak] Ensure height is int (closes #13313)

Sergey M․ 8 年之前
父节点
当前提交
931adf8cc1
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      youtube_dl/extractor/liveleak.py

+ 3 - 2
youtube_dl/extractor/liveleak.py

@@ -115,8 +115,9 @@ class LiveLeakIE(InfoExtractor):
 
 
         for a_format in info_dict['formats']:
         for a_format in info_dict['formats']:
             if not a_format.get('height'):
             if not a_format.get('height'):
-                a_format['height'] = self._search_regex(
-                    r'([0-9]+)p\.mp4', a_format['url'], 'height label', default=None)
+                a_format['height'] = int_or_none(self._search_regex(
+                    r'([0-9]+)p\.mp4', a_format['url'], 'height label',
+                    default=None))
 
 
         self._sort_formats(info_dict['formats'])
         self._sort_formats(info_dict['formats'])