Reputation: 995
I get a 404 error while checking the link using requests library for the page below while the page opens fine in the browser when I reach to it from it's parent page. Can someone please help me understand what's happening?. I get the same error using this service as well.
url = "http://www.dell.com/en-us/learn/assets/shared-content~data-sheets~en/documents~2016-v5-systems-oem-10022706.pdf"
response = requests.get(url)
print response.status_code
Upvotes: 0
Views: 26
Reputation: 33521
The first URL sets a cookie, that is sent to the server as you request the second link. If you call the second link with exactly the same request, excluding the cookie, you get a 404.
Upvotes: 1