aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan M <joksnet@gmail.com>2013-02-23 22:47:22 +0100
committerJuan M <joksnet@gmail.com>2013-02-23 22:47:22 +0100
commitd1b7a243548643f364fd129f6993ab16b2fa24f8 (patch)
tree5ed9277a642ff2887ecb5e1baf793d47cbf0a6ee
parent4be0aa35393ccd0af72741eb0f6f97920399893d (diff)
downloadyoutube-dl-d1b7a243548643f364fd129f6993ab16b2fa24f8.tar.xz
Decode the data requested to the api in utf-8.
-rwxr-xr-xyoutube_dl/InfoExtractors.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py
index d3c3ac264..89e7cd74c 100755
--- a/youtube_dl/InfoExtractors.py
+++ b/youtube_dl/InfoExtractors.py
@@ -1472,7 +1472,7 @@ class YoutubeSearchIE(InfoExtractor):
result_url = self._API_URL % (compat_urllib_parse.quote_plus(query), (50*pagenum)+1)
request = compat_urllib_request.Request(result_url)
try:
- data = compat_urllib_request.urlopen(request).read()
+ data = compat_urllib_request.urlopen(request).read().decode('utf-8')
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
self._downloader.trouble(u'ERROR: unable to download API page: %s' % compat_str(err))
return