苏飞大哥,帮我看看我这个请求。请求出来的页面不是我想要的html形式的,这个怎么办
[C#] 纯文本查看 复制代码 HttpItem item = new HttpItem();
item.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
item.Allowautoredirect = false;
item.Encoding = Encoding.GetEncoding("utf-8");
item.Header.Add("Upgrade-Insecure-Requests","1");
item.Header.Add("DNT", "1");
item.Header.Add("Cache-Control", "max-age=0");
item.Host = "www.immigration.govt.nz";
item.Method = "Get";
item.URL = "https://www.immigration.govt.nz/secure/Login+Working+Holiday.htm";
item.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36";
HttpHelper httpHelper = new HttpHelper();
HttpResult hr = httpHelper.GetHtml(item);
string html = hr.Html;
|