Skip to content

Instantly share code, notes, and snippets.

@beyoung
Created January 26, 2015 04:57
Show Gist options
  • Save beyoung/80d1038c657a80ab0bca to your computer and use it in GitHub Desktop.
Save beyoung/80d1038c657a80ab0bca to your computer and use it in GitHub Desktop.
import requests
url = "https://www.douban.com/accounts/login"
params =
{
"form_email":"***",
"form_password":"***",
"source":"index_nav"
}
with requests.Session() as c:
c.post(url,data=params)
request =c.get('http://www.douban.com/')
print request.text.encode('utf-8')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment