Trying to make a request from web App on Pythonanywhere (paid account) with a Flask. This works as needed on local PC, but receives an error on Pythonanywhere.
@app.route('/test/')
def test():
url_cookies='https://www.phoenixcontact.com/online/portal/ru/pxc/offcontext/'
headers = {'authority': 'www.phoenixcontact.com', 'method': 'GET','user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'}
requestCookies = requests.get(url_cookies,headers=headers)
return 'Test'+requestCookies.text
requests.getwill return aresponseobject. You're calling thatrequestCookies, so it would be useful to know the values ofrequestCookies.status_codeandrequestCookies.content.