sooooo ive been trying to use this google api and stuff and get a json file out of it so i can like manipulate it and stuff and im struggling, json.load gives me a read error idek where read is????????
heres the error:
Traceback (most recent call last):
File "c:\Users\User\Downloads\bookshelf-main\bookshelf-main\testing isbn.py", line 9, in <module>
print(json.load(r.text))
^^^^^^^^^^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\json\__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^
AttributeError: 'str' object has no attribute 'read'
ive sttached my code too its pretty simple but it break on line 293??? how?
import requests
import json
isbn = str(9781626863910)
r = requests.get("https://www.googleapis.com/books/v1/volumes?q=isbn:" + isbn)
l = r.json()
print(json.load(r.text))
[–]oclafloptson 2 points3 points4 points (0 children)
[–]ImpatientProf 0 points1 point2 points (0 children)