Skip to content

Commit

Permalink
Avoid encoding= parameter in json.load() as it has been deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehrdad committed Feb 20, 2022
1 parent 8d02250 commit 6d36852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion download_bcourses_photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6d36852

Please sign in to comment.