I am working on a project that requires web scraping. Hence I was looking at the Requests library in Python. In the quickstart page of the library the following code example is given:
>>> import requests
>>> r = requests.get('https://github.com/timeline.json')
>>> r.text
'[{"repository":{"open_issues":0,"url":"https://github.com/...
On trying out that code I found that the following error is returned when I try to print r.text:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Response' object has no attribute 'text'
What am I doing wrong?