Dec-19-2022, 07:17 PM
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'