本帖最后由 ccc4mak 于 2015-12-24 01:06 编辑
string code_cookie;
HttpHelper http = new HttpHelper(); HttpItem item = new HttpItem() { URL = "http://wap.17wo.cn/Index.action", UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36", Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", Method = "get", Encoding = null };
HttpResult result = http.GetHtml(item); code_cookie = result.cookie; item = new HttpItem() { URL = "http://wap.17wo.cn/Login!process.action", Encoding = null, Allowautoredirect = true, Method = "POST", Referer = "http://wap.17wo.cn/Login!process.action", Host = "wap.17wo.cn", Cookie = code_cookie, Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", ContentType = "application/x-www-form-urlencoded", Postdata = "mobile=xxxxx&backurl=&backurl2=&password=xxxx&chk=&loginType=0&chkType=on" };
result = http.GetHtml(item);
Console.WriteLine(result.Html);
請教各位是哪裏出錯了? http://wap.17wo.cn/Index.action 的cookie理應包含 cuid 的值, 是否要特別處理?
|