mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-07-01 03:22:50 -05:00
[discoverygo] Fix JSON data parsing
HTMLParser, which is used by extract_attributes, already unescapes attribute values with HTMLParser.unescape. They shouldn't be unescaped again, to there may be parsing errors. Ref: #11219, #11522
This commit is contained in:
@ -6,7 +6,6 @@ from ..utils import (
|
||||
extract_attributes,
|
||||
int_or_none,
|
||||
parse_age_limit,
|
||||
unescapeHTML,
|
||||
ExtractorError,
|
||||
)
|
||||
|
||||
@ -49,7 +48,7 @@ class DiscoveryGoIE(InfoExtractor):
|
||||
webpage, 'video container'))
|
||||
|
||||
video = self._parse_json(
|
||||
unescapeHTML(container.get('data-video') or container.get('data-json')),
|
||||
container.get('data-video') or container.get('data-json'),
|
||||
display_id)
|
||||
|
||||
title = video['name']
|
||||
|
Reference in New Issue
Block a user