mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-15 03:43:00 +08:00
Fix accidentally casting URL using int_or_none
This commit is contained in:
parent
5ce4b7599a
commit
8e4f219648
@ -3,6 +3,8 @@ from .common import InfoExtractor
|
|||||||
from .common import ExtractorError
|
from .common import ExtractorError
|
||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
|
from ..utils import int_or_none
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CamModelsIE(InfoExtractor):
|
class CamModelsIE(InfoExtractor):
|
||||||
@ -70,10 +72,10 @@ class CamModelsIE(InfoExtractor):
|
|||||||
formats.append({
|
formats.append({
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'url': encoding.get('location'),
|
'url': encoding.get('location'),
|
||||||
'width': encoding.get('videoWidth'),
|
'width': int_or_none(encoding.get('videoWidth')),
|
||||||
'height': encoding.get('videoHeight'),
|
'height': int_or_none(encoding.get('videoHeight')),
|
||||||
'vbr': encoding.get('videoKbps'),
|
'vbr': int_or_none(encoding.get('videoKbps')),
|
||||||
'abr': encoding.get('audioKbps'),
|
'abr': int_or_none(encoding.get('audioKbps')),
|
||||||
'format_id': fmtName + str(encoding.get('videoWidth'))
|
'format_id': fmtName + str(encoding.get('videoWidth'))
|
||||||
})
|
})
|
||||||
# If they change the JSON format, then fallback to parsing out RTMP links via regex.
|
# If they change the JSON format, then fallback to parsing out RTMP links via regex.
|
||||||
|
Loading…
Reference in New Issue
Block a user