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
Hide 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):
...
@@ -99,22 +99,28 @@ class CrawlerMain(object):
except
ReadTimeout
:
except
ReadTimeout
:
print
(
'timeout'
)
print
(
'timeout'
)
pass
pass
return
None
,
None
except
HTTPError
:
except
HTTPError
:
print
(
'httperror'
)
print
(
'httperror'
)
pass
pass
return
None
,
None
# 请求异常
# 请求异常
except
RequestException
:
except
RequestException
:
print
(
'reqerror'
)
print
(
'reqerror'
)
pass
pass
return
None
,
None
except
socket
.
timeout
:
except
socket
.
timeout
:
print
(
socket
.
timeout
)
print
(
socket
.
timeout
)
pass
pass
return
None
,
None
except
ReadTimeoutError
:
except
ReadTimeoutError
:
print
(
"ReadTimeoutError"
)
print
(
"ReadTimeoutError"
)
pass
pass
return
None
,
None
except
ConnectionError
:
except
ConnectionError
:
print
(
"ConnectionError"
)
print
(
"ConnectionError"
)
pass
pass
return
None
,
None
def
get_search_service_info_list
(
self
,
page
=
1
,
city_id
=-
1
,
query
=
""
):
def
get_search_service_info_list
(
self
,
page
=
1
,
city_id
=-
1
,
query
=
""
):
url
=
"https://www.soyoung.com/searchNew/product?"
\
url
=
"https://www.soyoung.com/searchNew/product?"
\
...
@@ -128,22 +134,28 @@ class CrawlerMain(object):
...
@@ -128,22 +134,28 @@ class CrawlerMain(object):
except
ReadTimeout
:
except
ReadTimeout
:
print
(
'超时,执行下一个请求'
)
print
(
'超时,执行下一个请求'
)
pass
pass
return
None
except
HTTPError
:
except
HTTPError
:
print
(
'httperror'
)
print
(
'httperror'
)
pass
pass
return
None
# 请求异常
# 请求异常
except
RequestException
:
except
RequestException
:
print
(
'reqerror'
)
print
(
'reqerror'
)
pass
pass
return
None
except
socket
.
timeout
:
except
socket
.
timeout
:
print
(
socket
.
timeout
)
print
(
socket
.
timeout
)
pass
pass
return
None
except
ReadTimeoutError
:
except
ReadTimeoutError
:
print
(
"ReadTimeoutError"
)
print
(
"ReadTimeoutError"
)
pass
pass
return
None
except
ConnectionError
:
except
ConnectionError
:
print
(
"ConnectionError"
)
print
(
"ConnectionError"
)
pass
pass
return
None
def
get_services_list
(
self
,
res_json
,
query
=
""
,
city_name
=
""
):
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