Commit 6d289c0f by [zhangzhiwei]

zhiwei-tools更新

parent 97909cfe
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<dependency> <dependency>
<groupId>com.zhiwei.tools</groupId> <groupId>com.zhiwei.tools</groupId>
<artifactId>zhiwei-tools</artifactId> <artifactId>zhiwei-tools</artifactId>
<version>0.0.8-SNAPSHOT</version> <version>0.0.9-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -37,11 +37,6 @@ public class WechatAritcleSearch { ...@@ -37,11 +37,6 @@ public class WechatAritcleSearch {
private static Logger logger = LogManager.getLogger(WechatAritcleSearch.class); private static Logger logger = LogManager.getLogger(WechatAritcleSearch.class);
private static HttpBoot httpBoot = new HttpBoot(); private static HttpBoot httpBoot = new HttpBoot();
/** /**
* *
* @Title: wechatKeywordSearch * @Title: wechatKeywordSearch
...@@ -277,7 +272,7 @@ public class WechatAritcleSearch { ...@@ -277,7 +272,7 @@ public class WechatAritcleSearch {
private static WechatAricle getContentAndSource(String url, ProxyHolder proxy,WechatAricle wechatAricle){ private static WechatAricle getContentAndSource(String url, ProxyHolder proxy,WechatAricle wechatAricle){
try { try {
// String htmlBody = HttpClientTemplateOK.get(url, proxy, null); // String htmlBody = HttpClientTemplateOK.get(url, proxy, null);
String htmlBody = httpBoot.syncCall(RequestUtils.wrapGet(url), proxy).body().string(); String htmlBody = httpBoot.syncCall(RequestUtils.wrapGet(url), proxy.getProxy()).body().string();
if(htmlBody!=null){ if(htmlBody!=null){
Document document = Jsoup.parse(htmlBody); Document document = Jsoup.parse(htmlBody);
String content = null; String content = null;
......
...@@ -40,7 +40,7 @@ public class WechatSearchExample{ ...@@ -40,7 +40,7 @@ public class WechatSearchExample{
for(String word : wordList) for(String word : wordList)
{ {
try { try {
List<WechatAricle> list = WechatAritcleSearch.wechatKeywordSearch(word, 5, "2018-10-25", "2018-10-25",null,null); List<WechatAricle> list = WechatAritcleSearch.wechatKeywordSearch(word, 5, "2018-10-25", "2018-10-25",null,null,null);
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
e.printStackTrace(); e.printStackTrace();
} catch (Exception e) { } catch (Exception e) {
......
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