spider
文章平均质量分 75
dfgip
这个作者很懒,什么都没留下…
展开
-
HttpClient设置代理的请求
在爬取数据的时候有的时候不能使用自己的真实ip爬取,需要简单配置一下用代理来完成。public static String getHttpGet(String url){ //get请求 HttpHost proxy = new HttpHost("127.0.0.1", 1080); DefaultProxyRoutePlanner routePlan原创 2016-08-19 10:33:00 · 1558 阅读 · 0 评论 -
爬取网页证书问题的解决方法
在爬取https的网页过程中,出现如下异常:javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unabl转载 2016-09-19 10:24:08 · 1634 阅读 · 0 评论 -
将相对路径转为绝对路径的方法
public static String relative2AbsolutePath(String content, String url, String tag, String property) throws URISyntaxException, MalformedURLException { String newContent = ""; if (con转载 2017-02-24 11:44:56 · 1565 阅读 · 0 评论