Commit 87c407d1 by [zhangzhiwei]

微信添加全文及来源采集

parent fd3dac6f
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.zhiwei</groupId> <groupId>com.zhiwei</groupId>
<artifactId>wechat</artifactId> <artifactId>wechat</artifactId>
<version>1.1.0-SNAPSHOT</version> <version>1.1.1-SNAPSHOT</version>
<description> <description>
知微微信采集程序,包含 知微微信采集程序,包含
1.微信历史文章采集 1.微信历史文章采集
......
//package com.zhiwei.wechat.example; package com.zhiwei.wechat.example;
//
//import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
//import java.net.UnknownHostException; import java.net.UnknownHostException;
//import java.util.ArrayList; import java.util.ArrayList;
//import java.util.List; import java.util.List;
//
//import org.junit.Test; import org.slf4j.Logger;
//import org.slf4j.Logger; import org.slf4j.LoggerFactory;
//import org.slf4j.LoggerFactory;
// import com.zhiwei.wechat.entity.WechatAricle;
//import com.zhiwei.wechat.entity.WechatAricle; import com.zhiwei.wechat.search.WechatAritcleSearch;
//import com.zhiwei.wechat.search.WechatAritcleSearch; import com.zhiwei.wechat.util.Tools;
//import com.zhiwei.wechat.util.Tools;
// /**
///** * @ClassName: WechatSearchExample
// * @ClassName: WechatSearchExample * @Description: TODO(根据关键词等采集数据)
// * @Description: TODO(根据关键词等采集数据) * @author hero
// * @author hero * @date 2016年12月16日 上午9:15:42
// * @date 2016年12月16日 上午9:15:42 */
// */ public class WechatSearchExample{
//public class WechatSearchExample{
// private Logger logger = LoggerFactory.getLogger(WechatSearchExample.class);
// private Logger logger = LoggerFactory.getLogger(WechatSearchExample.class);
//
// public static String cookie = "IPLOC=CN3302; SUID=EAD6E7733220910A000000005941E93A; SUV=1497491773102567; ABTEST=7|1497603317|v1; weixinIndexVisited=1; ppinf=5|1498107937|1499317537|dHJ1c3Q6MToxfGNsaWVudGlkOjQ6MjAxN3x1bmlxbmFtZToyNzolRTYlOUElOTclRTYlQkElOUYlRTYlODMlOTF8Y3J0OjEwOjE0OTgxMDc5Mzd8cmVmbmljazoyNzolRTYlOUElOTclRTYlQkElOUYlRTYlODMlOTF8dXNlcmlkOjQ0Om85dDJsdUJ6dUhpQ2IxcnB3OUZ0QWk4WTN5S0lAd2VpeGluLnNvaHUuY29tfA; pprdig=I4bAcCm_wsn8RDnyejcfFQ-1gxkd2q3VhMOcLSGlyEXZaT3Oq0fbbNN1wslhlmUEMSAMcqhwDG46ZYpKwnHMjFWGtWLqB0qzu8HfI0uCja08CIEt6hWICe66kYCzJNvEiXuu26wBjE47Zivcb8p4XD1CSxh5qRl59DYYDFXIrzM; sgid=08-27429961-AVlLUCFlKgO0FEox1ElfuR0; ld=Jlllllllll2ByW6ElllllVOUXJkllllltMKQfkllllwlllll4ylll5@@@@@@@@@@; LSTMV=405%2C353; LCLKINT=8709; SNUID=B08DBC295B5F0970DCAD6F2C5B1D68B2; ppmdig=1498817001000000c7e9b5e47114b70495487a6f03e36c6c; JSESSIONID=aaavdFFFwNH4Y_-_f0OZv; sct=10"; public static void main(String[] args) {
// try {
// @Test WechatSearchExample.wechatSearchExample();
// public void wechatSearchExample() throws UnknownHostException } catch (UnknownHostException e) {
e.printStackTrace();
}
}
public static void wechatSearchExample() throws UnknownHostException
{
List<String> wordList = new ArrayList<String>();
wordList.add("马化腾 知乎");
for(String word : wordList)
{
try {
List<WechatAricle> list = WechatAritcleSearch.wechatKeywordSearch(word, 5, "2018-10-25", "2018-10-25",null,null);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
// for(String wxId : wechatIds)
// { // {
// List<String> wordList = new ArrayList<String>();
// wordList.add("王石");
//
// String fileName = "E:\\微博mid.csv";
// List<String> wechatIds= Tools.getFileName(fileName);
//
// for(String word : wordList)
// {
//
// try { // try {
// List<WechatAricle> list = WechatAritcleSearch.wechatKeywordSearch(word, 5, "2017-06-25", "2017-06-25", cookie); // logger.info("需要采集的wxId:::{}", wxId);
//
// } catch (UnsupportedEncodingException e) { // } catch (UnsupportedEncodingException e) {
// e.printStackTrace(); // e.printStackTrace();
// } catch (Exception e) { // } catch (Exception e) {
// e.printStackTrace(); // e.printStackTrace();
// } // }
//// for(String wxId : wechatIds)
//// {
//// try {
//// logger.info("需要采集的wxId:::{}", wxId);
////
//// } catch (UnsupportedEncodingException e) {
//// e.printStackTrace();
//// } catch (Exception e) {
//// e.printStackTrace();
//// }
//// }
// } // }
// } }
// }
//
//}
}
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