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
f5499d74
Commit
f5499d74
authored
Aug 01, 2025
by
baiquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor(service): 优化抖店请求失败异常信息
- 在超过重试次数引发异常时,添加了详细的请求信息(方法、URL、代理、参数、数据、头部、Cookies) - 这有助于调试和分析请求失败的具体原因
parent
a8c2f721
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
service/doudian_request.py
+1
-1
No files found.
service/doudian_request.py
View file @
f5499d74
...
...
@@ -28,7 +28,7 @@ def doudian_request(method: str, url: str, proxies:dict, params:dict=None, data:
while
True
:
retry_count
+=
1
if
retry_count
>
3
:
raise
Exception
(
'超过重试次数,请求失败
'
)
raise
Exception
(
f
'超过重试次数,请求失败 method:{method}, url:{url}, proxies:{proxies}, params:{params}, data:{data}, json:{json}, headers:{headers}, cookies:{cookies}
'
)
try
:
if
headers
is
None
:
headers
=
HEADERS
...
...
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