优化: 库存耗尽继续重试 + 默认并发数改为150

- 库存耗尽后不再停止,继续重试(斗鱼可能补货)
- 默认并发数从 80 提升到 150,提高抢购速度
This commit is contained in:
yml2213
2026-06-26 13:00:47 +08:00
parent 64a63d1546
commit a955128887
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ const (
ScoreURL = BaseURL + "/japi/oms/web/peace/credit/balance"
UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36"
DefaultAttempts = 1
DefaultConcurrency = 80
DefaultConcurrency = 150
ProductCacheTTL = 30 * time.Second
DefaultConfigFile = "config.json"
+2 -1
View File
@@ -444,7 +444,8 @@ func jitterDuration(base time.Duration) time.Duration {
func classifyRetryStop(message string) (account bool, product bool, success bool, reason string) {
switch {
case strings.Contains(message, "商品本次活动库存已耗完"):
return true, true, false, "商品库存已耗完"
// 库存耗尽不停止,继续重试(斗鱼可能会补货)
return false, false, false, ""
case strings.Contains(message, "您已达本次活动兑换上限"):
return true, false, true, "已抢到(兑换上限)"
case strings.Contains(message, "未绑定账号"):