Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweiyang
wechat
Commits
87c407d1
Commit
87c407d1
authored
Oct 26, 2018
by
[zhangzhiwei]
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微信添加全文及来源采集
parent
fd3dac6f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
62 deletions
+64
-62
pom.xml
+1
-1
src/main/java/com/zhiwei/wechat/search/WechatAritcleSearch.java
+0
-0
src/test/java/com/zhiwei/wechat/example/WechatSearchExample.java
+63
-61
No files found.
pom.xml
View file @
87c407d1
...
@@ -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.微信历史文章采集
...
...
src/main/java/com/zhiwei/wechat/search/WechatAritcleSearch.java
View file @
87c407d1
This diff is collapsed.
Click to expand it.
src/test/java/com/zhiwei/wechat/example/WechatSearchExample.java
View file @
87c407d1
//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
();
// List<String> wordList = new ArrayList<String>();
}
// wordList.add("王石");
}
//
// String fileName = "E:\\微博mid.csv";
// List<String> wechatIds= Tools.getFileName(fileName);
public
static
void
wechatSearchExample
()
throws
UnknownHostException
//
{
// for(String word : wordList)
List
<
String
>
wordList
=
new
ArrayList
<
String
>();
// {
wordList
.
add
(
"马化腾 知乎"
);
//
// try {
for
(
String
word
:
wordList
)
// List<WechatAricle> list = WechatAritcleSearch.wechatKeywordSearch(word, 5, "2017-06-25", "2017-06-25", cookie);
{
// } catch (UnsupportedEncodingException e) {
try
{
// e.printStackTrace();
List
<
WechatAricle
>
list
=
WechatAritcleSearch
.
wechatKeywordSearch
(
word
,
5
,
"2018-10-25"
,
"2018-10-25"
,
null
,
null
);
// } catch (Exception e) {
}
catch
(
UnsupportedEncodingException
e
)
{
// e.printStackTrace();
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// for(String wxId : wechatIds)
// {
// try {
// logger.info("需要采集的wxId:::{}", wxId);
//
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// }
//// for(String wxId : wechatIds)
}
//// {
}
//// try {
//// logger.info("需要采集的wxId:::{}", wxId);
////
}
//// } catch (UnsupportedEncodingException e) {
//// e.printStackTrace();
//// } catch (Exception e) {
//// e.printStackTrace();
//// }
//// }
// }
// }
//
//
//}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment