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
2838ff4e
Commit
2838ff4e
authored
Jul 28, 2020
by
litaolemo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
9f62ee57
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
crawler_douban.py
crawler_sys/site_crawler_by_redis/crawler_douban.py
+5
-2
No files found.
crawler_sys/site_crawler_by_redis/crawler_douban.py
View file @
2838ff4e
...
...
@@ -144,8 +144,7 @@ class CrawlerDouban():
else
:
get_page
=
retry_get_url
(
url
,
headers
=
self
.
headers
,
timeout
=
self
.
timeout
)
except
:
get_page
=
None
has_more
=
False
continue
if
get_page
and
get_page
.
status_code
==
200
:
try
:
page_json
=
get_page
.
json
()
...
...
@@ -157,8 +156,10 @@ class CrawlerDouban():
except
Exception
as
e
:
print
(
"load data error
%
s"
%
e
)
continue
if
page_dic
:
for
one
in
page_dic
:
try
:
releaser_id
=
one
[
"author"
][
"id"
]
mid
=
one
[
"id"
]
if
True
:
...
...
@@ -186,6 +187,8 @@ class CrawlerDouban():
# print(res_dic)
yield
res_dic
except
Exception
as
e
:
print
(
"single data parse error
%
s "
%
e
)
# except Exception as e:
# print(one)
# print("row formate error %s" % e)
...
...
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