Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
crawler
Project
Project
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
backend
crawler
Commits
ea467720
Commit
ea467720
authored
4 years ago
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
209fc8b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
crawler_toutiao.py
crawler_sys/site_crawler/crawler_toutiao.py
+5
-1
No files found.
crawler_sys/site_crawler/crawler_toutiao.py
View file @
ea467720
...
@@ -329,8 +329,12 @@ class Crawler_toutiao():
...
@@ -329,8 +329,12 @@ class Crawler_toutiao():
content
=
res_json
[
"data"
]
.
get
(
"content"
)
.
replace
(
"
\r
"
,
""
)
.
replace
(
"
\n
"
,
""
)
content
=
res_json
[
"data"
]
.
get
(
"content"
)
.
replace
(
"
\r
"
,
""
)
.
replace
(
"
\n
"
,
""
)
except
:
except
:
content
=
""
content
=
""
try
:
title
=
res_json
[
"data"
]
.
get
(
"title"
)
.
replace
(
"
\r
"
,
""
)
.
replace
(
"
\n
"
,
""
)
except
:
title
=
""
res_dic
=
{
res_dic
=
{
"title"
:
res_json
[
"data"
]
.
get
(
"title"
)
.
replace
(
"
\r
"
,
""
)
.
replace
(
"
\n
"
,
""
)
,
"title"
:
title
,
'high_quality_flag'
:
int
(
res_json
[
"data"
]
.
get
(
'high_quality_flag'
)),
'high_quality_flag'
:
int
(
res_json
[
"data"
]
.
get
(
'high_quality_flag'
)),
"play_count"
:
int
(
res_json
[
"data"
]
.
get
(
'impression_count'
)),
"play_count"
:
int
(
res_json
[
"data"
]
.
get
(
'impression_count'
)),
"comment_count"
:
res_json
[
"data"
]
.
get
(
"comment_count"
),
"comment_count"
:
res_json
[
"data"
]
.
get
(
"comment_count"
),
...
...
This diff is collapsed.
Click to expand it.
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