I'm trying to access a web page using the requests library in Python. My code looks like this:
import requests
link = requests.get("www.example.com")
print(link.text)
When I run this code, I get the following output:
"I'm a teapot. You're a bot." Meaning <Response [418]>
It looks like I'm trying to access the CNN DataViz API and I'm getting a response status code of 418 indicating that the server is rejecting it and I'm a bot.
Could someone help me understand what's going on and how I can fix it? Thank you in advance for your help!