Fix for python3.9

'encoding' is deprecated and removed in Python 3.9 
could fix this https://github.com/taizan-hokuto/pytchat/issues/24
This commit is contained in:
zecktos
2020-12-13 13:39:58 +01:00
committed by GitHub
parent afd7cea635
commit ee839da7c9

View File

@@ -168,7 +168,7 @@ class PytchatCore:
with httpx.Client(http2=True) as client:
try:
response = client.post(self._fetch_url, json=param)
livechat_json = json.loads(response.text, encoding='utf-8')
livechat_json = json.loads(response.text)
break
except (json.JSONDecodeError, httpx.ConnectTimeout, httpx.ReadTimeout, httpx.ConnectError) as e:
err = e