aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/youtube.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-02-09 17:56:10 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-02-09 17:56:10 +0100
commit81c2f20b5386d89a62dc27293654d75b77f47473 (patch)
tree1c47e338c343d09884819f0f81544a45209f6dec /youtube_dl/extractor/youtube.py
parent1afe753462f0293122dc7a9b534b4f5cdb1e5c4e (diff)
[youtube] Correct invalid JSON (Fixes #2353)
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r--youtube_dl/extractor/youtube.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index e038c7752..18a92e101 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -34,6 +34,7 @@ from ..utils import (
unified_strdate,
orderedSet,
write_json_file,
+ uppercase_escape,
)
class YoutubeBaseInfoExtractor(InfoExtractor):
@@ -1590,11 +1591,10 @@ class YoutubeChannelIE(InfoExtractor):
# Download all channel pages using the json-based channel_ajax query
for pagenum in itertools.count(1):
url = self._MORE_PAGES_URL % (pagenum, channel_id)
- page = self._download_webpage(url, channel_id,
- u'Downloading page #%s' % pagenum)
-
- page = json.loads(page)
-
+ page = self._download_json(
+ url, channel_id, note=u'Downloading page #%s' % pagenum,
+ transform_source=uppercase_escape)
+
ids_in_page = self.extract_videos_from_page(page['content_html'])
video_ids.extend(ids_in_page)