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
6d289c0f
Commit
6d289c0f
authored
Nov 17, 2018
by
[zhangzhiwei]
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zhiwei-tools更新
parent
97909cfe
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
8 deletions
+4
-8
pom.xml
+2
-1
src/main/java/com/zhiwei/wechat/search/WechatAritcleSearch.java
+1
-6
src/test/java/com/zhiwei/wechat/example/WechatSearchExample.java
+1
-1
No files found.
pom.xml
View file @
6d289c0f
...
@@ -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
src/main/java/com/zhiwei/wechat/search/WechatAritcleSearch.java
View file @
6d289c0f
...
@@ -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
;
...
...
src/test/java/com/zhiwei/wechat/example/WechatSearchExample.java
View file @
6d289c0f
...
@@ -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
)
{
...
...
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