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):