[foxgay] Ensure height is int
authorSergey M․ <dstftw@gmail.com>
Thu, 8 Jun 2017 17:22:14 +0000 (00:22 +0700)
committerSergey M․ <dstftw@gmail.com>
Thu, 8 Jun 2017 17:22:14 +0000 (00:22 +0700)
youtube_dl/extractor/foxgay.py

index e887ae48869426617fdbf797182cef93f97ac2ef..512a106455cc7460d81f48d2890bc457fccbe661 100644 (file)
@@ -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)))]