Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
strategy_spider
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
rank
strategy_spider
Commits
5782ab0c
Commit
5782ab0c
authored
Jan 13, 2020
by
段英荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加搜索爬取功能
parent
6af82443
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
zhihu_login.py
zhihu_login.py
+5
-5
No files found.
zhihu_login.py
View file @
5782ab0c
...
...
@@ -248,19 +248,19 @@ class ZhihuAccount(object):
if
"data"
in
raw_content_dict
:
for
data_item
in
raw_content_dict
[
"data"
]:
type
=
data_item
[
"obeject"
][
"type"
]
data_
type
=
data_item
[
"obeject"
][
"type"
]
content
=
data_item
[
"object"
][
"content"
]
platform_id
=
data_item
[
"object"
][
"id"
]
user_id
=
random
.
choice
(
majia_user_list
)
question_id
=
""
if
type
==
"article"
:
if
data_
type
==
"article"
:
title
=
data_item
[
"object"
][
"title"
]
elif
type
==
"answer"
:
elif
data_
type
==
"answer"
:
title
=
data_item
[
"object"
][
"question"
][
"name"
]
question_id
=
data_item
[
"object"
][
"question"
][
"id"
]
else
:
print
(
"type is:
%
s"
%
type
)
print
(
"type is:
%
s"
%
data_
type
)
title
=
""
item_dict
=
{
...
...
@@ -268,7 +268,7 @@ class ZhihuAccount(object):
"platform_id"
:
platform_id
,
"title"
:
title
,
"content"
:
content
,
"type"
:
type
,
"type"
:
data_
type
,
"question_id"
:
question_id
}
...
...
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