分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程
HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成
HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子
编码的问题? |
是这样额 谢谢飞哥了 哎我笨了 |
Encoding=Encoding.UTF8 |
这样也不行额飞哥 我错了吗? |
HttpHelper http = new HttpHelper(); HttpItem item = new HttpItem() { URL = "http://115.28.140.51:9090/index.php?m=admin&a=adminlogin", Method = "POST", Postdata = "username=admin&pwd=123456", PostEncoding = Encoding.UTF8, Cookie = Cookies, }; HttpResult result = http.GetHtml(item); Cookies += HttpHelper.GetSmallCookie(result.Cookie); string html = result.Html; html = HttpHelper.URLDecode(html, Encoding.UTF8); |
那接收的编码咋整呢 飞哥 |
PostEncoding = Encoding.UTF8, 是设置的发送时的编码,你看清楚属性的意思,应该是 Encoding |
发了 |
HttpHelper http = new HttpHelper(); HttpItem item = new HttpItem() { URL = "http://115.28.140.51:9090/index.php?m=admin&a=adminlogin", Method = "POST", Postdata = "username=admin&pwd=123456", PostEncoding = Encoding.UTF8, Cookie = Cookies, }; HttpResult result = http.GetHtml(item); Cookies += HttpHelper.GetSmallCookie(result.Cookie); string html = result.Html; |