mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-22 20:20:09 +09:00
Fix json.decoder.JSONDecodeError: Extra data
Fix an error that occurs when `webpage` contains a JSON with multiple records.
This commit is contained in:
parent
a803582717
commit
6d88c72317
@ -430,7 +430,10 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
||||
if note_m:
|
||||
raise ExtractorError(note_m)
|
||||
|
||||
mobj = re.search(r'Page\.messaging_box_controller\.addItems\(\[(?P<msg>{.+?})\]\)', webpage)
|
||||
mobj = re.search(
|
||||
r'Page\.messaging_box_controller\.addItems\(\[(?P<msg>{(?!.*},{).+?})\]\)',
|
||||
webpage)
|
||||
|
||||
if mobj:
|
||||
msg = json.loads(mobj.group('msg'))
|
||||
if msg.get('type') == 'error':
|
||||
|
Loading…
Reference in New Issue
Block a user