I use Requests and some URL’s give a different response code than a call with the same URL in a browser.
For example:
import requests
req = requests.get('http://www.jordaaninfo.nl')
responsecode = req.status_code
# responsecode == 500
gives a responsecode 500 while the page http://www.jordaaninfo.nl is available via Chrome/FF/Safari.
Thanks,
Niels
In my Firefox the 500 status code also occurs for http://www.jordaaninfo.nl, but the page is displayed anyway. This can be seen in the Net tab of Firebug.
My Chromium browser on Linux gets a 200 OK.
The problem (and solution) is in the Accept-Language header in the request.
Apparently, the server has special needs in this respect 😉
The problem and solution can be demonstrated with wget:
The 500 Error in my Firefox was caused by language ‘nl’ as first entry in the Accept-Language setting: