|
楼主 |
发表于 2014-12-17 20:47:51
|
显示全部楼层
我试了!就是抓打开页面时的COOKIE 然后获取和添加时都加上了!还是提示验证码错误!
代码:
private void Form1_Load(object sender, EventArgs e)
{
item = new HttpHelper.HttpItem()
{
URL = "https://user.qunar.com/captcha/api/image?k={en7mni(z&p=ucenter_login&c=ef7d278eca6d25aa6aec7272d57f0a9a&t=1418819333206",
Method = "get",
Cookie = "QN25=fad2f7c1-ad8e-4159-be90-bca674cca3c7-9f992f90; _i=RBTjeSJWldRVcM0RinU5QsbzYeix; QN1=wKgZEFSRdsR6CijIUsnNAg==; csrfToken=ehrnTwRGVwAQGcCl5tzKc0uYm30Diyet; _vi=RbW5cX6R0UnR1HKndzYPH1uqYOcTEE3VWwopp82QRMyJX9agebSK6swYSEqHLA_8n6iPMGb-MBDFIjZEAWrrxwIUQA9I3h96sLmYgGDFaowAcxeeYnGmrZvatfC-R68BSr32epXBfJGVFGHnG5eYtKRZDmDbSb-uLH-VHvG2gPL8; JSESSIONID=A8BF7B47880CDF3D8C1FECE8AD830A97"
};
this.pictureBox1.Image = http.GetImage(item);
}
item = new HttpHelper.HttpItem()
{
URL = "https://user.qunar.com/passport/loginx.jsp",
Method = "post",
Referer = "https://user.qunar.com/passport/login.jsp?ret=http%3A%2F%2Fuser.qunar.com%2Fuserinfo%2Findex.jsp",
Accept = "application/json, text/javascript, */*; q=0.01",
ContentType = "application/x-www-form-urlencoded; charset=UTF-8",
Host = "user.qunar.com",
Cookie = "QN25=fad2f7c1-ad8e-4159-be90-bca674cca3c7-9f992f90; _i=RBTjeSJWldRVcM0RinU5QsbzYeix; QN1=wKgZEFSRdsR6CijIUsnNAg==; csrfToken=ehrnTwRGVwAQGcCl5tzKc0uYm30Diyet; _vi=RbW5cX6R0UnR1HKndzYPH1uqYOcTEE3VWwopp82QRMyJX9agebSK6swYSEqHLA_8n6iPMGb-MBDFIjZEAWrrxwIUQA9I3h96sLmYgGDFaowAcxeeYnGmrZvatfC-R68BSr32epXBfJGVFGHnG5eYtKRZDmDbSb-uLH-VHvG2gPL8; JSESSIONID=A8BF7B47880CDF3D8C1FECE8AD830A97; JSESSIONID=A8BF7B47880CDF3D8C1FECE8AD830A97",
Postdata = "loginType=2&ret=http%3A%2F%2Fuser.qunar.com%2Fuserinfo%2Findex.jsp&username=rxletnm1524&password=AAbb123456&remember=0&vcode="+textBox2.Text.Trim()
};
result = http.GetHtml(item);
this.textBox1.Text = result.Html;
能帮我看下吗?验证码也可以正常获取!但是就是无法登陆 ! |
|