I am running the code below with requests on python 2.7 on OSX
html_response = requests.get(website_variable)
if html_response.status_code != 200:
print "There was an error! Status code = " + str(html_response.status_code)
print html_response.content
sys.exit(1)
I get an HTML response of 503 from the website I am trying to get the response from. I also found a response from the website to turn on Javascript.
<noscript><h1 data-translate="turn_on_js" style="color:#bd2426;">Please turn JavaScript on and reload the page.</h1></noscript>
Am I doing trying to gather information from this website in the correct way? Do I need to turn on a setting or feature in the requests module?