Can someone explain this? I'm trying to use python requests library, its attributes and methods. while using .JSON()
method I get this error. How should I fix it and why this error? thanks in advance.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
----> 7 print(response.json())
AttributeError: 'str' object has no attribute 'json'
method I get this error. How should I fix it and why this error? thanks in advance.
import requests url="https://www.google.com/" response=requests.get(url).text print(response.json())=======================
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
----> 7 print(response.json())
AttributeError: 'str' object has no attribute 'json'
Larz60+ write Dec-19-2022, 07:25 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post.
Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed this time, please use BBCode on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post.
Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed this time, please use BBCode on future posts.