Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media_data_crawler
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
media_data_crawler
Commits
5f4ff8d3
Commit
5f4ff8d3
authored
Aug 04, 2018
by
zhiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
360网页采集
parent
491f1e25
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/main/java/com/zhiwei/media_data_crawler/crawler/SoCrawlerParse.java
+2
-2
No files found.
src/main/java/com/zhiwei/media_data_crawler/crawler/SoCrawlerParse.java
View file @
5f4ff8d3
...
@@ -215,7 +215,7 @@ public class SoCrawlerParse extends HttpClientTemplateOK {
...
@@ -215,7 +215,7 @@ public class SoCrawlerParse extends HttpClientTemplateOK {
String
time
=
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getString
(
"create_time"
);
String
time
=
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getString
(
"create_time"
);
String
source
=
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getJSONObject
(
"user"
).
getString
(
"uname"
);
String
source
=
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getJSONObject
(
"user"
).
getString
(
"uname"
);
String
user_id
=
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getJSONObject
(
"user"
).
getString
(
"user_id"
);
String
user_id
=
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getJSONObject
(
"user"
).
getString
(
"user_id"
);
String
link
=
"https://www.toutiao.com/a"
+
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getString
(
"qid"
)
+
"/"
;
String
link
=
"https://www.toutiao.com/a"
+
dataJson
.
getJSONObject
(
"data"
).
getJSONArray
(
"question"
).
getJSONObject
(
0
).
getString
(
"qid"
);
return
new
NewsData
(
link
,
title
,
source
,
time
,
content
,
"头条问答"
,
word
,
user_id
);
return
new
NewsData
(
link
,
title
,
source
,
time
,
content
,
"头条问答"
,
word
,
user_id
);
}
else
if
(
htmlBody
.
contains
(
"var BASE_DATA = "
)){
}
else
if
(
htmlBody
.
contains
(
"var BASE_DATA = "
)){
...
@@ -226,7 +226,7 @@ public class SoCrawlerParse extends HttpClientTemplateOK {
...
@@ -226,7 +226,7 @@ public class SoCrawlerParse extends HttpClientTemplateOK {
String
time
=
dataJson
.
getJSONObject
(
"articleInfo"
).
getJSONObject
(
"subInfo"
).
getString
(
"time"
);
String
time
=
dataJson
.
getJSONObject
(
"articleInfo"
).
getJSONObject
(
"subInfo"
).
getString
(
"time"
);
String
source
=
dataJson
.
getJSONObject
(
"mediaInfo"
).
getString
(
"name"
);
String
source
=
dataJson
.
getJSONObject
(
"mediaInfo"
).
getString
(
"name"
);
String
user_id
=
dataJson
.
getJSONObject
(
"mediaInfo"
).
getString
(
"uid"
);
String
user_id
=
dataJson
.
getJSONObject
(
"mediaInfo"
).
getString
(
"uid"
);
String
link
=
"https://www.toutiao.com/a"
+
dataJson
.
getJSONObject
(
"articleInfo"
).
getString
(
"groupId"
)
+
"/"
;
String
link
=
"https://www.toutiao.com/a"
+
dataJson
.
getJSONObject
(
"articleInfo"
).
getString
(
"groupId"
);
return
new
NewsData
(
link
,
title
,
source
,
time
,
content
,
"今日头条"
,
word
,
user_id
);
return
new
NewsData
(
link
,
title
,
source
,
time
,
content
,
"今日头条"
,
word
,
user_id
);
}
else
if
(
htmlBody
.
contains
(
"404错误页"
)){
}
else
if
(
htmlBody
.
contains
(
"404错误页"
)){
logger
.
info
(
"{}:::数据有问题,该文章已被删除}"
,
url
);
logger
.
info
(
"{}:::数据有问题,该文章已被删除}"
,
url
);
...
...
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