Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
toutiao
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
zhiwei
toutiao
Commits
cc074bc0
Commit
cc074bc0
authored
Feb 25, 2019
by
yangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
头条版本升级以及代理使用不加时间间隔
parent
9e857f34
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletions
+7
-1
pom.xml
+1
-1
src/main/java/com/zhiwei/toutiao/parse/TouTiaoCommentParse.java
+6
-0
No files found.
pom.xml
View file @
cc074bc0
...
...
@@ -3,7 +3,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.zhiwei
</groupId>
<artifactId>
toutiao
</artifactId>
<version>
0.3.
1
-SNAPSHOT
</version>
<version>
0.3.
2
-SNAPSHOT
</version>
<dependencies>
<dependency>
...
...
src/main/java/com/zhiwei/toutiao/parse/TouTiaoCommentParse.java
View file @
cc074bc0
...
...
@@ -6,6 +6,7 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -72,11 +73,16 @@ public class TouTiaoCommentParse {
{
List
<
TouTiaoComment
>
commentes
=
analySisComment
(
htmlBody
,
url
);
ttList
.
addAll
(
commentes
);
logger
.
info
(
" url {} 采集到第 {} 页 采集到 {} 条数据 "
,
url
,
page
,
ttList
.
size
());
}
else
{
logger
.
info
(
"采集出现问题,地址为:{}"
,
url
);
}
if
(
Objects
.
nonNull
(
proxy
))
{
ZhiWeiTools
.
sleep
(
100
);
}
else
{
ZhiWeiTools
.
sleep
(
4000
);
}
break
;
}
catch
(
Exception
e
)
{
continue
;
...
...
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