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
99e5200a
Commit
99e5200a
authored
Oct 31, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加搜狗微信由link获取真实链接(带有效期)方法
parent
6073ff18
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
pom.xml
+1
-1
src/main/java/com/zhiwei/wechat/search/WechatAritcleSearch.java
+3
-3
No files found.
pom.xml
View file @
99e5200a
...
@@ -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.2.
4
-SNAPSHOT
</version>
<version>
1.2.
5
-SNAPSHOT
</version>
<description>
<description>
知微微信采集程序,包含
知微微信采集程序,包含
1.微信历史文章采集
1.微信历史文章采集
...
...
src/main/java/com/zhiwei/wechat/search/WechatAritcleSearch.java
View file @
99e5200a
...
@@ -77,7 +77,7 @@ public class WechatAritcleSearch {
...
@@ -77,7 +77,7 @@ public class WechatAritcleSearch {
// 获取数据
// 获取数据
String
htmlBody
=
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxy
,
false
).
body
().
string
();
String
htmlBody
=
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxy
,
false
).
body
().
string
();
// 解析数据
// 解析数据
if
(
StringUtils
.
isNotBlank
(
htmlBody
)
&&
!
htmlBody
.
contains
(
"输入验证码"
)
)
{
if
(
StringUtils
.
isNotBlank
(
htmlBody
))
{
Document
document
=
Jsoup
.
parse
(
htmlBody
);
Document
document
=
Jsoup
.
parse
(
htmlBody
);
result
.
addAll
(
analysis
(
document
));
result
.
addAll
(
analysis
(
document
));
// 解析最大可寻页码
// 解析最大可寻页码
...
@@ -143,7 +143,7 @@ public class WechatAritcleSearch {
...
@@ -143,7 +143,7 @@ public class WechatAritcleSearch {
// 获取数据
// 获取数据
String
htmlBody
=
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxy
,
false
).
body
().
string
();
String
htmlBody
=
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxy
,
false
).
body
().
string
();
// 解析数据
// 解析数据
if
(
StringUtils
.
isNotBlank
(
htmlBody
)
&&
!
htmlBody
.
contains
(
"输入验证码"
)
)
{
if
(
StringUtils
.
isNotBlank
(
htmlBody
))
{
Document
document
=
Jsoup
.
parse
(
htmlBody
);
Document
document
=
Jsoup
.
parse
(
htmlBody
);
result
.
addAll
(
analysis
(
document
));
result
.
addAll
(
analysis
(
document
));
// 解析最大可寻页码
// 解析最大可寻页码
...
@@ -260,7 +260,7 @@ public class WechatAritcleSearch {
...
@@ -260,7 +260,7 @@ public class WechatAritcleSearch {
headerMap
.
put
(
"Referer"
,
searchUrl
);
headerMap
.
put
(
"Referer"
,
searchUrl
);
// 获取数据
// 获取数据
String
htmlBody
=
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxyHolder
,
true
).
body
().
string
();
String
htmlBody
=
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxyHolder
,
true
).
body
().
string
();
if
(
StringUtils
.
isNotBlank
(
htmlBody
)
&&
!
htmlBody
.
contains
(
"输入验证码"
)
)
{
if
(
StringUtils
.
isNotBlank
(
htmlBody
))
{
Document
document
=
Jsoup
.
parse
(
htmlBody
);
Document
document
=
Jsoup
.
parse
(
htmlBody
);
result
.
addAll
(
analysis
(
document
));
result
.
addAll
(
analysis
(
document
));
// 解析最大可寻页码
// 解析最大可寻页码
...
...
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