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
3c19d6e7
Commit
3c19d6e7
authored
Jul 19, 2021
by
李小芳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
3310832b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
crawler_xinyang_ask_service.py
dev/xinyang_ask_tag/crawler_xinyang_ask_service.py
+12
-0
No files found.
dev/xinyang_ask_tag/crawler_xinyang_ask_service.py
View file @
3c19d6e7
...
...
@@ -99,22 +99,28 @@ class CrawlerMain(object):
except
ReadTimeout
:
print
(
'timeout'
)
pass
return
None
,
None
except
HTTPError
:
print
(
'httperror'
)
pass
return
None
,
None
# 请求异常
except
RequestException
:
print
(
'reqerror'
)
pass
return
None
,
None
except
socket
.
timeout
:
print
(
socket
.
timeout
)
pass
return
None
,
None
except
ReadTimeoutError
:
print
(
"ReadTimeoutError"
)
pass
return
None
,
None
except
ConnectionError
:
print
(
"ConnectionError"
)
pass
return
None
,
None
def
get_search_service_info_list
(
self
,
page
=
1
,
city_id
=-
1
,
query
=
""
):
url
=
"https://www.soyoung.com/searchNew/product?"
\
...
...
@@ -128,22 +134,28 @@ class CrawlerMain(object):
except
ReadTimeout
:
print
(
'超时,执行下一个请求'
)
pass
return
None
except
HTTPError
:
print
(
'httperror'
)
pass
return
None
# 请求异常
except
RequestException
:
print
(
'reqerror'
)
pass
return
None
except
socket
.
timeout
:
print
(
socket
.
timeout
)
pass
return
None
except
ReadTimeoutError
:
print
(
"ReadTimeoutError"
)
pass
return
None
except
ConnectionError
:
print
(
"ConnectionError"
)
pass
return
None
def
get_services_list
(
self
,
res_json
,
query
=
""
,
city_name
=
""
):
...
...
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