Merge remote-tracking branch 'joksnet/ytsearch_decode_request'
This commit is contained in:
commit
9befce2b8c
1 changed files with 1 additions and 1 deletions
|
@ -1472,7 +1472,7 @@ class YoutubeSearchIE(InfoExtractor):
|
||||||
result_url = self._API_URL % (compat_urllib_parse.quote_plus(query), (50*pagenum)+1)
|
result_url = self._API_URL % (compat_urllib_parse.quote_plus(query), (50*pagenum)+1)
|
||||||
request = compat_urllib_request.Request(result_url)
|
request = compat_urllib_request.Request(result_url)
|
||||||
try:
|
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:
|
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))
|
self._downloader.trouble(u'ERROR: unable to download API page: %s' % compat_str(err))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue