|
本帖最后由 yx1412 于 2013-11-11 01:28 编辑
请求时Https的,证书也已经下载
但就是登陆不了,我是新手,麻烦老师指导一下,谢谢
下面POSTDATA数据是真实账户,可以测试
下面是我的代码:
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "https://www.huobi.com/account/login.php",
Encoding ="UTF-8",
Method = "Get",
Timeout = 100000,
ReadWriteTimeout = 30000,
IsToLower = false,
Cookie = cookie,
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
Accept = "text/html, application/xhtml+xml, */*",
ContentType = "text/html",
Referer ="https://www.huobi.com/account/login.php",
CerPath = "d:\\123.cer",
};
HttpResult result = http.GetHtml(item);
string cookie = result.Cookie;
HttpItem item = new HttpItem()
{
URL = "https://www.huobi.com/account/login.php",
Encoding ="UTF-8",
Method = "POST",
Timeout = 100000,
ReadWriteTimeout = 30000,
IsToLower = false,
Cookie = cookie,
UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0",
Accept = "text/html, application/xhtml+xml, */*",
ContentType = "text/html",
Referer ="https://www.huobi.com/account/login.php",
CerPath = "d:\\123.cer",//证书绝对路径 可选项不需要证书时可以不写这个参数
Postdata = "email=2459655376@qq.com&password=12345abc",//Post数据 可选项GET时不需要写
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
string cookie = result.Cookie;
另外,用Httphelper获取到的cookie也和我用浏览器抓到的不一样,这是咋回事?
|
|