I am trying to figure this out, but had no luck:
import requests
r = requests.get('http://example.com/m7ppct4', allow_redirects=True)
r.status_code returns 200, and r.content returns ''.
r.headers returns the following dictionary:
{'content-length': '0',
'content-language': 'en-US',
'x-powered-by': 'Servlet/3.0',
'set-cookie': '__cfduid=d4b3d47d43189ac72be14b1d2a2bed98a1408989649815; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.azdoa.gov; HttpOnly, LWJSESSIONID=0000SESSIONMANAGEMENTAFFINI:18h1v85u3; Path=/; HttpOnly, NSC_batubufkpctWTTTM=ffffffff09f39f1545525d5f4f58455e445a4a42378b;expires=Mon, 25-Aug-2014 18:02:49 GMT;path=/;secure;httponly',
'expires': 'Thu, 01 Dec 1994 16:00:00 GMT',
'server': 'cloudflare-nginx',
'connection': 'keep-alive',
'x-ua-compatible': 'IE=EmulateIE9',
'cache-control': 'no-cache="set-cookie, set-cookie2"',
'date': 'Mon, 25 Aug 2014 18:00:49 GMT',
'cf-ray': '15f9b0ff50cf0d6d-LAX',
'content-type': 'application/octet-stream'}
When I open the page in a browser, I clearly get content.
Any thoughts on how I can proceed debugging this? I would like to get the page content with a requests.get() call.
requests.__version__returns'2.3.0'- Tammo Heerenallow_redirects, I was wondering - Padraic Cunningham