|
HttpHelper helper=new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "https://passport.meituan.com/account/unitivelogin",
Method ="get",
// ContentType = "application/x-www-form-urlencoded",
// Postdata = "email=18642409996&password=1qazxsw2&csrf=gC6gmDS3-glE3hfF0xn1hwJntmsIHeVzdsZo&captcha&commit=登录&fingerprint&origin=account-login&continue=http://peisong.meituan.com/account/settoken&service=banma_huoban"
};
HttpResult result = helper.GetHtml(item);
String s = result.Html;
String code = Public.cutString(s, "\"csrf\" value=\"", "\"");
HttpHelper httpHelper=new HttpHelper();
HttpItem item1 = new HttpItem()
{
URL = "https://passport.meituan.com/account/unitivelogin",
Method = "post",
Referer = "https://passport.meituan.com/account/unitivelogin",
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0",
ContentType = "application/x-www-form-urlencoded",
Postdata = "service=banma_huoban&continue=http%3A%2F%2Fpeisong.meituan.com%2Faccount%2Fsettoken&captcha=&csrf=" + code + "&email=18641405596&fingerprint=1-6-1-8qb|8e|7u|w5|ap|8t|8a|7r|7m|76|6r|6c&origin=account-login&password=1234"
};
item.Header.Add("x-requested-with", "XMLHttpRequest");
item.Header.Add("X-CSRF-Token",code);
HttpResult rsHttpResult = httpHelper.GetHtml(item1);
String s1 = rsHttpResult.Html;
不知道应该怎么爬了,新手,求指点
|
|