1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-10 10:15:36 +08:00

Fix accidentally casting URL using int_or_none

This commit is contained in:
mars67857 2017-10-15 17:10:35 -07:00
parent 5ce4b7599a
commit 8e4f219648

View File

@ -3,6 +3,8 @@ from .common import InfoExtractor
from .common import ExtractorError
import json
import re
from ..utils import int_or_none
class CamModelsIE(InfoExtractor):
@ -70,10 +72,10 @@ class CamModelsIE(InfoExtractor):
formats.append({
'ext': 'mp4',
'url': encoding.get('location'),
'width': encoding.get('videoWidth'),
'height': encoding.get('videoHeight'),
'vbr': encoding.get('videoKbps'),
'abr': encoding.get('audioKbps'),
'width': int_or_none(encoding.get('videoWidth')),
'height': int_or_none(encoding.get('videoHeight')),
'vbr': int_or_none(encoding.get('videoKbps')),
'abr': int_or_none(encoding.get('audioKbps')),
'format_id': fmtName + str(encoding.get('videoWidth'))
})
# If they change the JSON format, then fallback to parsing out RTMP links via regex.