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
cf30abcd
Commit
cf30abcd
authored
Nov 10, 2018
by
[zhangzhiwei]
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://git.zhiweidata.top/zhangzhiwei/toutiao.git
parents
38731ea7
3a1b65e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/main/java/com/zhiwei/toutiao/parse/TouTiaoArticleParse.java
+5
-0
No files found.
src/main/java/com/zhiwei/toutiao/parse/TouTiaoArticleParse.java
View file @
cf30abcd
...
@@ -39,6 +39,7 @@ public class TouTiaoArticleParse {
...
@@ -39,6 +39,7 @@ public class TouTiaoArticleParse {
private
TouTiaoArticleParse
()
{}
private
TouTiaoArticleParse
()
{}
private
static
Logger
logger
=
LogManager
.
getLogger
(
TouTiaoArticleParse
.
class
);
private
static
Logger
logger
=
LogManager
.
getLogger
(
TouTiaoArticleParse
.
class
);
private
static
HttpBoot
httpBoot
=
new
HttpBoot
();
private
static
HttpBoot
httpBoot
=
new
HttpBoot
();
/***
/***
* 获取头条数据
* 获取头条数据
*
*
...
@@ -106,6 +107,9 @@ public class TouTiaoArticleParse {
...
@@ -106,6 +107,9 @@ public class TouTiaoArticleParse {
String
time
=
data
.
getLongValue
(
"behot_time"
)*
1000
+
""
;
String
time
=
data
.
getLongValue
(
"behot_time"
)*
1000
+
""
;
Date
date
=
TimeParse
.
stringFormartDate
(
time
);
Date
date
=
TimeParse
.
stringFormartDate
(
time
);
String
readNum
=
data
.
getString
(
"total_read_count"
);
String
readNum
=
data
.
getString
(
"total_read_count"
);
if
(
readNum
==
null
)
{
readNum
=
data
.
getInteger
(
"internal_visit_count"
)+
""
;
}
String
commentNum
=
data
.
getString
(
"comments_count"
);
String
commentNum
=
data
.
getString
(
"comments_count"
);
String
playNum
=
data
.
getString
(
"detail_play_effective_count"
);
String
playNum
=
data
.
getString
(
"detail_play_effective_count"
);
String
shareNum
=
data
.
getString
(
"share_count"
);
String
shareNum
=
data
.
getString
(
"share_count"
);
...
@@ -113,6 +117,7 @@ public class TouTiaoArticleParse {
...
@@ -113,6 +117,7 @@ public class TouTiaoArticleParse {
String
user_id
=
data
.
getLong
(
"creator_uid"
)+
""
;
String
user_id
=
data
.
getLong
(
"creator_uid"
)+
""
;
TouTiaoArticle
tt
=
new
TouTiaoArticle
(
href
,
title
,
user_id
,
source
,
date
,
content
,
commentNum
,
playNum
,
readNum
,
shareNum
,
"今日头条"
);
TouTiaoArticle
tt
=
new
TouTiaoArticle
(
href
,
title
,
user_id
,
source
,
date
,
content
,
commentNum
,
playNum
,
readNum
,
shareNum
,
"今日头条"
);
dataList
.
add
(
tt
);
dataList
.
add
(
tt
);
System
.
out
.
println
(
tt
.
toString
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"数据解析出现问题,{}"
,
e
.
getMessage
());
logger
.
error
(
"数据解析出现问题,{}"
,
e
.
getMessage
());
...
...
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