正在抓取知乎链接:https://www.zhihu.com/question/28594126
发送GET请求出现异常!java.io.IOException: HTTPS hostname wrong: should be
java.io.IOException: HTTPS hostname wrong: should be
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at mothed.Util.SendGet(Util.java:26)
at bean.ZhiHuPicBean.(ZhiHuPicBean.java:47)
at mothed.Spider.downloadPic(Spider.java:21)
at test.ZhiHuMain.main(ZhiHuMain.java:29)
正在抓取知乎链接:https://www.zhihu.com/question/28594126 发送GET请求出现异常!java.io.IOException: HTTPS hostname wrong: should be
java.io.IOException: HTTPS hostname wrong: should be
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at mothed.Util.SendGet(Util.java:26)
at bean.ZhiHuPicBean.(ZhiHuPicBean.java:47)
at mothed.Spider.downloadPic(Spider.java:21)
at test.ZhiHuMain.main(ZhiHuMain.java:29)
标题:null
即将开始下载图片到D:/知乎爬虫/null
开始下载................
图片下载完毕,请到D:/知乎爬虫/null里去看看吧!!!
我把里面的url改成http://www.zhihu.com 没有发生异常,但是爬取得内容为null,没有爬到内容