|
1金钱
想登录后下载 这个网址的 听力课程
用的苏飞的httphelper. 其中带了cookie 但是 打开这个网址的时候 还是显示的未登录状态
我用的代码如下, 里边的cookie值 是我手动从浏览器里边 获取的, 求大牛如何破这个网站的 音频下载额
http://www.bigear.cn/resdown-40-7777700000920.html
HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem()
{
URL = "http://www.bigear.cn/resdown-40-7777700000920.html",//URL 必需项
Encoding = System.Text.Encoding.GetEncoding( "utf-8"),//URL 可选项 默认为Get
Method = "get",//URL 可选项 默认为Get
IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写
Cookie = "bigear_sid=aPsiIWYJ2e; bdshare_firstime=1471602637581; BDHY_enabled=0; pgv_si=s2023770112; PHPSESSID=b1q1dvdma4s2dnm4lk1e42b3h4; visitHistory=a%3A1%3A%7Bs%3A2%3A%22rs%22%3Ba%3A6%3A%7Bi%3A0%3Ba%3A2%3A%7Bs%3A5%3A%22title%22%3Bs%3A33%3A%22VOA%E6%85%A2%E9%80%9F%EF%BC%9A%E7%A5%9E%E5%A5%87%E7%9A%84%E5%A5%A5%E8%BF%90%E4%BC%9A...%22%3Bs%3A3%3A%22url%22%3Bs%3A22%3A%22res-3570-7777700199905%22%3B%7Di%3A1%3Ba%3A2%3A%7Bs%3A5%3A%22title%22%3Bs%3A33%3A%22VOA%E6%85%A2%E9%80%9F%EF%BC%9A%E7%A5%9E%E5%A5%87%E7%9A%84%E5%A5%A5%E8%BF%90%E4%BC%9A...%22%3Bs%3A3%3A%22url%22%3Bs%3A22%3A%22res-3570-7777700199905%22%3B%7Di%3A2%3Ba%3A2%3A%7Bs%3A5%3A%22title%22%3Bs%3A33%3A%22VOA%E6%85%A2%E9%80%9F%EF%BC%9A%E7%A5%9E%E5%A5%87%E7%9A%84%E5%A5%A5%E8%BF%90%E4%BC%9A...%22%3Bs%3A3%3A%22url%22%3Bs%3A22%3A%22res-3570-7777700199905%22%3B%7Di%3A3%3Ba%3A2%3A%7Bs%3A5%3A%22title%22%3Bs%3A33%3A%22VOA%E6%85%A2%E9%80%9F%EF%BC%9A%E7%A5%9E%E5%A5%87%E7%9A%84%E5%A5%A5%E8%BF%90%E4%BC%9A...%22%3Bs%3A3%3A%22url%22%3Bs%3A22%3A%22res-3570-7777700199905%22%3B%7Di%3A4%3Ba%3A2%3A%7Bs%3A5%3A%22title%22%3Bs%3A33%3A%22VOA%E6%85%A2%E9%80%9F%EF%BC%9A%E7%A5%9E%E5%A5%87%E7%9A%84%E5%A5%A5%E8%BF%90%E4%BC%9A...%22%3Bs%3A3%3A%22url%22%3Bs%3A22%3A%22res-3570-7777700199905%22%3B%7Di%3A5%3Ba%3A2%3A%7Bs%3A5%3A%22title%22%3Bs%3A33%3A%22VOA%E6%85%A2%E9%80%9F%EF%BC%9A%E7%A5%9E%E5%A5%87%E7%9A%84%E5%A5%A5%E8%BF%90%E4%BC%9A...%22%3Bs%3A3%3A%22url%22%3Bs%3A22%3A%22res-3570-7777700199905%22%3B%7D%7D%7D; pgv_pvi=3011747840; pgv_info=ssi=s6255633804; Hm_lvt_f6ea1b71488f93f8a52c134049fc30d6=1471939856; Hm_lpvt_f6ea1b71488f93f8a52c134049fc30d6=1471939856; base_domain_a4e878282348429fb05d8290d8cdaacb=bigear.cn; xnsetting_a4e878282348429fb05d8290d8cdaacb=%7B%22connectState%22%3A2%2C%22oneLineStorySetting%22%3A3%2C%22shortStorySetting%22%3A3%2C%22shareAuth%22%3Anull%7D; XiaoNeiID=0; _xauthTK=6b6aODZKMn8ubOwow%2BL98sYVUXZ0vdT5PVvPGrF%2B4J7be50bI%2B3fHSZfGhJm3UvY5t2%2FIldXpFMxN2XyZibeH2J0QDQxZobeutHeegEWTqbAhiqdMw; _xauthSG=49b1e3c53365066e1a2f458c502c3e5b; mylogin=ifAgfPqkbITCqpIetAY7Ys7ZtRv8x8APSGb3X7bU5nFfw6s0Qgx8; bigear_name=renwoxing8; sessionMemberID=5218384; sessionFund=130; CNZZDATA2013619=cnzz_eid%3D929588396-1471599136-http%253A%252F%252Fradio.bigear.cn%252F%26ntime%3D1471934996",//字符串Cookie 可选项
Referer ="",//来源URL 可选项
Postdata = "",//Post数据 可选项GET时不需要写
Timeout = 100000,//连接超时时间 可选项默认为100000
ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000
UserAgent = "Opera/9.27 (Windows NT 5.2; U; zh-cn)",//用户的浏览器类型,版本,操作系统 可选项有默认值
ContentType = "text/html",//返回类型 可选项有默认值
Allowautoredirect = false,//是否根据301跳转 可选项
//CerPath = "d:\123.cer",//证书绝对路径 可选项不需要证书时可以不写这个参数
//Connectionlimit = 1024,//最大连接数 可选项 默认为1024
ProxyIp = "",//代理服务器ID 可选项 不需要代理 时可以不设置这三个参数
//ProxyPwd = "123456",//代理服务器密码 可选项
//ProxyUserName = "administrator",//代理服务器账户名 可选项
ResultType = ResultType.String
};
HttpResult result = http.GetHtml(item);
string html = result.Html;
string cookie = result.Cookie;
|
|