Decode the data requested to the api in utf-8.
authorJuan M <joksnet@gmail.com>
Sat, 23 Feb 2013 21:47:22 +0000 (22:47 +0100)
committerJuan M <joksnet@gmail.com>
Sat, 23 Feb 2013 21:47:22 +0000 (22:47 +0100)
youtube_dl/InfoExtractors.py

index d3c3ac2640447af6da4f42c48cb607a1383ace84..89e7cd74cc511f8571cc5686986105f77f7d52ff 100755 (executable)
@@ -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