0

I want to simulate user login using python.

but the site didn't response cookies(set cookies) after user login

can you tell me how the site to keep the login-status and how can i simulate user login

this is the header before login:

GET http://bss.10010fj.cn:8888/onlinesale/agent/login/login.jsp HTTP/1.1

Accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, /

Referer: http://bss.10010fj.cn/onlinesale/logoutLoginAction.go

Accept-Language: zh-Hans-CN,zh-Hans;q=0.8,en-US;q=0.5,en;q=0.3

User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)

Accept-Encoding: gzip, deflate

Connection: Keep-Alive

Host: bss.10010fj.cn:8888

Cookie: JSESSIONID=GhC9empAvHbijt0RPHbgO3D1AIdt99QdyWtY62pluL7YVtSNDQ9M!-1764458366; sto-id-29987-dailishang_9077=AEEKIAIGPCCD

Community
  • 1
  • 1
王玮玮
  • 1
  • 1
  • http://stackoverflow.com/questions/11892729/how-to-log-in-to-a-website-using-pythons-requests-module is this of any help? – Bahrom Mar 29 '16 at 15:54
  • @BAH Thank you~ I used urllib2 and cookielib before, and i save the cookies after login, but it does not word when i open an another page. – 王玮玮 Mar 29 '16 at 16:01
  • @BAH I think i should try to use requests lib – 王玮玮 Mar 29 '16 at 16:03

0 Answers0