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
cedeeab7
Commit
cedeeab7
authored
Nov 09, 2019
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将验证码链接转换为临时链接的重试次数修改为5次
parent
80ff7d80
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
pom.xml
+1
-1
src/main/java/com/zhiwei/wechat/search/WechatReal.java
+4
-3
No files found.
pom.xml
View file @
cedeeab7
...
@@ -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.
7
-SNAPSHOT
</version>
<version>
1.2.
8
-SNAPSHOT
</version>
<description>
<description>
知微微信采集程序,包含
知微微信采集程序,包含
1.微信历史文章采集
1.微信历史文章采集
...
...
src/main/java/com/zhiwei/wechat/search/WechatReal.java
View file @
cedeeab7
...
@@ -55,7 +55,7 @@ public class WechatReal {
...
@@ -55,7 +55,7 @@ public class WechatReal {
String
word
=
originalUrl
.
split
(
"query="
)[
1
];
String
word
=
originalUrl
.
split
(
"query="
)[
1
];
String
searchUrl
=
"https://weixin.sogou.com/weixin?query="
+
word
;
String
searchUrl
=
"https://weixin.sogou.com/weixin?query="
+
word
;
for
(
int
i
=
0
;
i
<
5
;
i
++){
for
(
int
i
=
0
;
i
<
3
;
i
++){
try
{
try
{
headerMap
.
put
(
"referer"
,
searchUrl
);
headerMap
.
put
(
"referer"
,
searchUrl
);
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxy
).
body
().
string
();
httpBoot
.
syncCall
(
RequestUtils
.
wrapGet
(
searchUrl
,
headerMap
),
proxy
).
body
().
string
();
...
@@ -73,11 +73,12 @@ public class WechatReal {
...
@@ -73,11 +73,12 @@ public class WechatReal {
return
furl
.
toString
();
return
furl
.
toString
();
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
logger
.
error
(
"获取真实链接时出现错误,错误为:{}"
,
e
);
if
(
i
==
2
){
throw
e
;
}
continue
;
continue
;
}
}
}
}
return
null
;
return
null
;
}
}
}
}
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