Browse Source

[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
totalwebcasting
Yen Chi Hsuan 8 years ago
parent
commit
24d8a75982
No known key found for this signature in database GPG Key ID: 7F902A182457CA23
2 changed files with 7 additions and 2 deletions
  1. +6
    -0
      ChangeLog
  2. +1
    -2
      youtube_dl/extractor/discoverygo.py

+ 6
- 0
ChangeLog View File

@ -1,3 +1,9 @@
version <unreleased>
Extractors
* [discoverygo] Fix JSON data parsing (#11219, #11522)
version 2017.01.05
Extractors


+ 1
- 2
youtube_dl/extractor/discoverygo.py View File

@ -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']


Loading…
Cancel
Save