[vlive] Fix error message decoding for python 2 (#28004)
authorping <ping@users.noreply.github.com>
Fri, 29 Jan 2021 08:02:18 +0000 (16:02 +0800)
committerGitHub <noreply@github.com>
Fri, 29 Jan 2021 08:02:18 +0000 (08:02 +0000)
youtube_dl/extractor/vlive.py

index 6224e620035f0f7263533a247b92121252226b58..e2f5d81b86f1f22bc3a7b383a2457a20bf81156c 100644 (file)
@@ -116,7 +116,7 @@ class VLiveIE(VLiveBaseIE):
                 headers={'Referer': 'https://www.vlive.tv/'}, query=query)
         except ExtractorError as e:
             if isinstance(e.cause, compat_HTTPError) and e.cause.code == 403:
-                self.raise_login_required(json.loads(e.cause.read().decode())['message'])
+                self.raise_login_required(json.loads(e.cause.read().decode('utf-8'))['message'])
             raise
 
     def _real_extract(self, url):