Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
doudian-py
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiquan
doudian-py
Commits
a8c2f721
Commit
a8c2f721
authored
Aug 01, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(service): 优化请求失败异常捕获
- 在请求失败时增加通用异常捕获,确保不会出现未处理的异常 -记录异常信息到日志,方便问题排查
parent
56d4c5df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
service/doudian_request.py
+3
-0
No files found.
service/doudian_request.py
View file @
a8c2f721
...
...
@@ -59,4 +59,6 @@ def doudian_request(method: str, url: str, proxies:dict, params:dict=None, data:
raise
Exception
({
response
.
text
})
except
CookiesExpiredError
as
e
:
logger
.
error
(
f
'请求失败-->{e.msg}'
)
except
Exception
as
e
:
logger
.
error
(
f
'请求失败-->{e}'
)
time
.
sleep
(
3
)
\ No newline at end of file
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