0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-18 01:35:12 +00:00

Fix blip.tv in python3

This commit is contained in:
Philipp Hagemeister 2012-12-11 17:00:11 +01:00
parent d050de77f9
commit 55c0539872

View file

@ -2262,7 +2262,7 @@ def _real_extract(self, url):
else: else:
cchar = '?' cchar = '?'
json_url = url + cchar + 'skin=json&version=2&no_wrap=1' json_url = url + cchar + 'skin=json&version=2&no_wrap=1'
request = compat_urllib_request.Request(json_url.encode('utf-8')) request = compat_urllib_request.Request(json_url)
self.report_extraction(mobj.group(1)) self.report_extraction(mobj.group(1))
info = None info = None
try: try:
@ -2287,7 +2287,8 @@ def _real_extract(self, url):
return return
if info is None: # Regular URL if info is None: # Regular URL
try: try:
json_code = urlh.read() json_code_bytes = urlh.read()
json_code = json_code_bytes.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 read video info webpage: %s' % compat_str(err)) self._downloader.trouble(u'ERROR: unable to read video info webpage: %s' % compat_str(err))
return return