Skip to content

Commit

Permalink
1.8.2 修复风控时崩溃 HTTP error 429
Browse files Browse the repository at this point in the history
  • Loading branch information
fsender committed Apr 23, 2024
1 parent 4e1cdef commit c87bef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ def _http(self,url,j=False,data=None,raw=False):
else:
print("HTTP请求响应 {} 错误! 5秒后重试...".format(e.code))
sleep(5)
return {"code":999999999,"errno":e.code,"data":"HTTP返回代码异常"}
# print(res)
if res.code != 200:
self.error_handle("抢票姬的IP地址可能被风控咯,都是蜀黍干的好事!!\n可以换个WiFi或热点试试. 请求地址: " + url)
print("抢票姬的IP地址可能被风控咯,都是蜀黍干的好事!!\n可以换个WiFi或热点试试. 请求地址: " + url)
sleep(5)
return {"code":999999999,"errno":res.code,"data":"触发风控"}
if j:
return json.loads(res.read().decode("utf-8","ignore"))
elif raw:
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

2. 升级 selenium(浏览器模块) 的内核, 目前适用于124版edge

3. 追加: 修复一切风控时崩溃(风控触发之后五秒一次重试, 请及时自己退出程序)

## 1.8.1 更新日志

1. 梳理了部分临时文件
Expand Down

0 comments on commit c87bef2

Please sign in to comment.