浏览代码

[foxgay] Ensure height is int

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

+ 2 - 1
youtube_dl/extractor/foxgay.py

@@ -5,6 +5,7 @@ import itertools
 from .common import InfoExtractor
 from ..utils import (
     get_element_by_id,
+    int_or_none,
     remove_end,
 )
 
@@ -46,7 +47,7 @@ class FoxgayIE(InfoExtractor):
 
         formats = [{
             'url': source,
-            'height': resolution,
+            'height': int_or_none(resolution),
         } for source, resolution in zip(
             video_data['sources'], video_data.get('resolutions', itertools.repeat(None)))]