Is there any way of grabbing the html source code from here? I'm sending a post login request to a website, and if the response status is 302 I want to check the source code. I couldn't find away to do this. Here is what I have:
http = httplib2.Http()
url = "http://example.com"
login = "test"
password = "test"
body = {'login': login, 'password' : password}
headers = {'Content-type' : 'application/x-www-form-urlencoded'}
response, content = http.request(url, 'POST', headers=headers, body=urllib.urlencode(body))
if response.status == '302':
break
"break" is where I need to get the html source code.