Commit f5499d74 by baiquan

refactor(service): 优化抖店请求失败异常信息

- 在超过重试次数引发异常时,添加了详细的请求信息(方法、URL、代理、参数、数据、头部、Cookies)
- 这有助于调试和分析请求失败的具体原因
parent a8c2f721
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment