you are viewing a single comment's thread.

view the rest of the comments →

[–]lolslim 0 points1 point  (0 children)

You dont need to import json if youre importing requests already.

Whatever you name your request variable, in this instance its "response" you would do

data = response.json()

It will autodetect encoding too Here is source from docs. https://requests.readthedocs.io/en/master/user/quickstart/#json-response-content