mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-19 09:25:43 +00: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:
parent
7232bb299b
commit
24d8a75982
@ -1,3 +1,9 @@
|
|||||||
|
version <unreleased>
|
||||||
|
|
||||||
|
Extractors
|
||||||
|
* [discoverygo] Fix JSON data parsing (#11219, #11522)
|
||||||
|
|
||||||
|
|
||||||
version 2017.01.05
|
version 2017.01.05
|
||||||
|
|
||||||
Extractors
|
Extractors
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
extract_attributes,
|
extract_attributes,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_age_limit,
|
parse_age_limit,
|
||||||
unescapeHTML,
|
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -49,7 +48,7 @@ def _real_extract(self, url):
|
|||||||
webpage, 'video container'))
|
webpage, 'video container'))
|
||||||
|
|
||||||
video = self._parse_json(
|
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)
|
display_id)
|
||||||
|
|
||||||
title = video['name']
|
title = video['name']
|
||||||
|
Loading…
Reference in New Issue
Block a user