[C#] 纯文本查看 复制代码 HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.sufeinet.com",//URL这里都是测试 必需项
Encoding = null,//编码格式(utf-8,gb2312,gbk) 可选项 默认类会自动识别
//Encoding = Encoding.Default,
Method = "get",//URL 可选项 默认为Get
ResultCookieType = ResultCookieType.CookieCollection
};
//得到HTML代码
HttpResult result = http.GetHtml(item);
item = new HttpItem()
{
URL = "http://tool.sufeinet.com",//URL这里都是测试URl 必需项
Encoding = null,//编码格式(utf-8,gb2312,gbk) 可选项 默认类会自动识别
//Encoding = Encoding.Default,
Method = "get",//URL 可选项 默认为Get
CookieCollection = result.CookieCollection,
};
//得到新的HTML代码
result = http.GetHtml(item);
飞哥看了你这段代码后测试了先登入再转到会员中心那一页时显示不出会员内容看了的CookieCollection内并没有记下已登陆的 cookies
|