From ee839da7c9890edac522ed953ac986a1b34f8036 Mon Sep 17 00:00:00 2001 From: zecktos <56479813+zecktos@users.noreply.github.com> Date: Sun, 13 Dec 2020 13:39:58 +0100 Subject: [PATCH 1/3] Fix for python3.9 'encoding' is deprecated and removed in Python 3.9 could fix this https://github.com/taizan-hokuto/pytchat/issues/24 --- pytchat/core/pytchat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytchat/core/pytchat.py b/pytchat/core/pytchat.py index 361057d..0cb76d4 100644 --- a/pytchat/core/pytchat.py +++ b/pytchat/core/pytchat.py @@ -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 From 9b38a5428d336d46452a0e3eea8956a0d4cdb972 Mon Sep 17 00:00:00 2001 From: taizan-hokouto <55448286+taizan-hokuto@users.noreply.github.com> Date: Sun, 13 Dec 2020 22:08:10 +0900 Subject: [PATCH 2/3] Add python version --- .github/workflows/run_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_test.yml b/.github/workflows/run_test.yml index eb8cf62..d806334 100644 --- a/.github/workflows/run_test.yml +++ b/.github/workflows/run_test.yml @@ -9,7 +9,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 From 0a8ff3abdcf0cdb4ee952b5546e6c04896f20d72 Mon Sep 17 00:00:00 2001 From: taizan-hokouto <55448286+taizan-hokuto@users.noreply.github.com> Date: Sun, 13 Dec 2020 22:28:39 +0900 Subject: [PATCH 3/3] Increment version --- pytchat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytchat/__init__.py b/pytchat/__init__.py index 74a7424..4d1065b 100644 --- a/pytchat/__init__.py +++ b/pytchat/__init__.py @@ -2,7 +2,7 @@ pytchat is a lightweight python library to browse youtube livechat without Selenium or BeautifulSoup. """ __copyright__ = 'Copyright (C) 2019, 2020 taizan-hokuto' -__version__ = '0.4.9' +__version__ = '0.5.0' __license__ = 'MIT' __author__ = 'taizan-hokuto' __author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'