只需一步,快速开始
分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程
HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成
HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子
使用道具 举报
站长苏飞 发表于 2014-1-16 12:59 你看错了吧,没有加密,直接Get请求就能获取到,你只需要提取结果就行了
站长苏飞 发表于 2014-1-16 13:16 只要能取到190,000,000不就行了
“utf-8 http-equiv=content-type”不是受支持的编码名。 参数名: name
HttpHelper http = new HttpHelper(); HttpItem item = new HttpItem() { //URL = "http://www.baidu.com/s?wd=site%3Abaidu.com", URL = "https://www.google.com.hk/webhp?hl=en#hl=en&newwindow=1&q=site:baidu.com", ResultType = ResultType.Byte, }; HttpResult result = http.GetHtml(item); string html = result.Html;
bluescharp 发表于 2014-1-16 13:48 用的Httphelper获取google源码报错。 [C#] 纯文本查看 复制代码“utf-8 http-equiv=content-type”不 ...[/quote] [mw_shl_code=csharp,true] HttpHelper http = new HttpHelper(); HttpItem item = new HttpItem() { URL = "https://www.google.com.hk/webhp?hl=en#hl=en&newwindow=1&q=site:baidu.com",//URL 必需项 Method = "get",//URL 可选项 默认为Get IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写 Cookie = "",//字符串Cookie 可选项 Referer ="",//来源URL 可选项 Postdata = "",//Post数据 可选项GET时不需要写 Timeout = 100000,//连接超时时间 可选项默认为100000 ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000 UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",//用户的浏览器类型,版本,操作系统 可选项有默认值 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; 正常的啊,如果你不是下载的最新版Httphelper请下载最新版的
“utf-8 http-equiv=content-type”不 ...[/quote] [mw_shl_code=csharp,true] HttpHelper http = new HttpHelper(); HttpItem item = new HttpItem() { URL = "https://www.google.com.hk/webhp?hl=en#hl=en&newwindow=1&q=site:baidu.com",//URL 必需项 Method = "get",//URL 可选项 默认为Get IsToLower = false,//得到的HTML代码是否转成小写 可选项默认转小写 Cookie = "",//字符串Cookie 可选项 Referer ="",//来源URL 可选项 Postdata = "",//Post数据 可选项GET时不需要写 Timeout = 100000,//连接超时时间 可选项默认为100000 ReadWriteTimeout = 30000,//写入Post数据超时时间 可选项默认为30000 UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",//用户的浏览器类型,版本,操作系统 可选项有默认值 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;
站长苏飞 发表于 2014-1-16 15:20 [mw_shl_code=csharp,true] HttpHelper http = new HttpHelper(); HttpItem ite ...
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|手机版|联系我们|关于我们|广告合作|苏飞论坛 ( 豫ICP备18043678号-2)
GMT+8, 2025-2-26 14:33
© 2014-2021