Commit 119619cb by yangchen

链接 错误修改

parent b66c4c38
...@@ -2,7 +2,6 @@ package com.zhiwei.toutiao.parse; ...@@ -2,7 +2,6 @@ package com.zhiwei.toutiao.parse;
import java.io.IOException; import java.io.IOException;
import java.net.Proxy; import java.net.Proxy;
import java.net.SocketTimeoutException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -16,7 +15,6 @@ import com.alibaba.fastjson.JSONObject; ...@@ -16,7 +15,6 @@ import com.alibaba.fastjson.JSONObject;
import com.zhiwei.crawler.core.HttpBoot; import com.zhiwei.crawler.core.HttpBoot;
import com.zhiwei.crawler.core.RequestUtils; import com.zhiwei.crawler.core.RequestUtils;
import com.zhiwei.crawler.proxy.ProxyHolder; import com.zhiwei.crawler.proxy.ProxyHolder;
import com.zhiwei.tools.httpclient.HttpClientTemplateOK;
import com.zhiwei.tools.tools.ZhiWeiTools; import com.zhiwei.tools.tools.ZhiWeiTools;
import com.zhiwei.toutiao.bean.TouTiaoComment; import com.zhiwei.toutiao.bean.TouTiaoComment;
import com.zhiwei.toutiao.util.Tools; import com.zhiwei.toutiao.util.Tools;
...@@ -69,7 +67,7 @@ public class TouTiaoCommentParse { ...@@ -69,7 +67,7 @@ public class TouTiaoCommentParse {
headerMap.put("Host", "is.snssdk.com"); headerMap.put("Host", "is.snssdk.com");
for(int j=1; j<=3; j++){ for(int j=1; j<=3; j++){
try { try {
String htmlBody = downloadHtml(url, proxy, headerMap); String htmlBody = downloadHtml(urlNew, proxy, headerMap);
if(htmlBody!=null) if(htmlBody!=null)
{ {
List<TouTiaoComment> commentes = analySisComment(htmlBody, url); List<TouTiaoComment> commentes = analySisComment(htmlBody, url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment