1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-13 19:53:26 +08:00

Only catch KeyError when accessing JSON dict

This commit is contained in:
mars67857 2017-10-15 16:30:10 -07:00
parent f9d000e265
commit 437dd510d3

View File

@ -71,7 +71,7 @@ class CamModelsIE(InfoExtractor):
'format_id': str(format.get('videoWidth'))
})
# If they change the JSON format, then fallback to parsing out RTMP links via regex.
except:
except KeyError:
manifest_json = json.dumps(manifest)
manifest_links = re.finditer(
r'(?P<id>rtmp?:\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#&//=]*))',