From 6d3685222be797cd8fc29f19779b95eba4cf70ca Mon Sep 17 00:00:00 2001 From: Mehrdad <> Date: Sat, 19 Feb 2022 21:19:33 -0600 Subject: [PATCH] Avoid encoding= parameter in json.load() as it has been deprecated --- download_bcourses_photos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_bcourses_photos.py b/download_bcourses_photos.py index fdff9f1..6e9deaa 100644 --- a/download_bcourses_photos.py +++ b/download_bcourses_photos.py @@ -39,7 +39,7 @@ def get_content_charset(headers): def read_http_response_as_json(response): - return json.load(response, encoding=get_content_charset(response.headers)) + return json.loads(response.read().decode(get_content_charset(response.headers))) def fetcher(q):