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
3a1b65e6
Commit
3a1b65e6
authored
Nov 06, 2018
by
yangchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 部分用户 阅读数 解析失败 (郑凯
https://www.toutiao.com/c/user/52155284452/#mid=52155284452
)
parent
f1569223
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 @
3a1b65e6
...
...
@@ -39,6 +39,7 @@ public class TouTiaoArticleParse {
private
TouTiaoArticleParse
()
{}
private
static
Logger
logger
=
LogManager
.
getLogger
(
TouTiaoArticleParse
.
class
);
private
static
HttpBoot
httpBoot
=
new
HttpBoot
();
/***
* 获取头条数据
*
...
...
@@ -106,6 +107,9 @@ public class TouTiaoArticleParse {
String
time
=
data
.
getLongValue
(
"behot_time"
)*
1000
+
""
;
Date
date
=
TimeParse
.
stringFormartDate
(
time
);
String
readNum
=
data
.
getString
(
"total_read_count"
);
if
(
readNum
==
null
)
{
readNum
=
data
.
getInteger
(
"internal_visit_count"
)+
""
;
}
String
commentNum
=
data
.
getString
(
"comments_count"
);
String
playNum
=
data
.
getString
(
"detail_play_effective_count"
);
String
shareNum
=
data
.
getString
(
"share_count"
);
...
...
@@ -113,6 +117,7 @@ public class TouTiaoArticleParse {
String
user_id
=
data
.
getLong
(
"creator_uid"
)+
""
;
TouTiaoArticle
tt
=
new
TouTiaoArticle
(
href
,
title
,
user_id
,
source
,
date
,
content
,
commentNum
,
playNum
,
readNum
,
shareNum
,
"今日头条"
);
dataList
.
add
(
tt
);
System
.
out
.
println
(
tt
.
toString
());
}
}
catch
(
Exception
e
)
{
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