分布式系统框架(V2.0) 轻松承载百亿数据,千万流量!讨论专区 - 源码下载 - 官方教程
HttpHelper爬虫框架(V2.7-含.netcore) HttpHelper官方出品,爬虫框架讨论区 - 源码下载 - 在线测试和代码生成
HttpHelper爬虫类(V2.0) 开源的爬虫类,支持多种模式和属性 源码 - 代码生成器 - 讨论区 - 教程- 例子
我的问题解决了 .net框架要4.6极以上的才行 我之前用的是4.0 自己搞了一下午 分享给你们 |
已解决了,把.net frame work升级到4.5就可以了,之前的4.0不支持TLS1.2 |
SecurityProtocol = (SecurityProtocolType)3072, 加上这个属性看看。我测试过可以的 不过好像类没有这个属性,我的框架里面才有 |
sufeinet 发表于 2018-5-23 10:34 还是有问题; 我之前是用的 System.Net.HttpVersion.Version11, 改成了10还是不行; 以下是我的源代码,我用的是VB.NET 麻烦再帮我看一下,十分感谢! Dim url = "https://api.keepa.com/product?key=456&domain=1&asin=DSAFEWQFDSA" Try Dim hp As HttpHelper = New HttpHelper Dim item As HttpItem = New HttpItem With item .URL = url .Method = "Get" .ReadWriteTimeout = 300000 .IsToLower = False .KeepAlive = True .Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" '.UserAgent = "" .ContentType = "application/x-www-form-urlencoded" '.Referer = "" .Allowautoredirect = True '.Postdata &= "&Signature=" & UrlEncode(Sign(stringToSign, algorithm), False) .ResultType = ResultType.Byte '.ProtocolVersion = System.Net.HttpVersion.Version11 .ProtocolVersion = System.Net.HttpVersion.Version10 End With Dim result As HttpResult = hp.GetHtml(item) MessageBox.Show(dLeft(result.Html, 500)) Catch ex As Exception MessageBox.Show(ex.Message.ToString) End Try |
ProtocolVersion = System.Net.HttpVersion.Version10, |