Skip to content

Commit 233fd5a

Browse files
author
API-Rank-Bot
committed
fix: TeamoRouter换域名后被过期失效记录隐藏,清理site_status/cache并给检测脚本加反爬容错(401/403/429视为在线)
1 parent 337d8ad commit 233fd5a

6 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,10 @@ AI API中转站是聚合多家AI大模型API(如Claude、GPT、Gemini、DeepSe
290290

291291
## 📝 更新日志
292292

293+
### v1.6.7 (2026-11-08)
294+
- 🐛 修复 TeamoRouter 换域名后从榜单消失:清掉 `site_status.json` 中 2026-08-22 遗留的失效记录(该站实测 HTTP 200 在线)
295+
- 🛡️ 检测脚本增加反爬容错:HEAD/GET 返回 401/403/429 视为「在线(反爬拦截)」,不再误判 Cloudflare 站点失效(`daily_check.py` / `weekly_check.py` / `crawler_v3.py`)
296+
293297
### v1.6.6 (2026-11-08)
294298
- ✅ TeamoRouter 官方域名迁移:全站链接 `teamorouter.cn` → `teamorouter.com`(邀请参数 `?i=ad992e768a` 保留),共更新 4 个文件 9 处
295299
- ✅ 新增「茶壶 TeapotRouter」中转站(9.55,Claude Code + GPT 双协议直连 / 约官方 35% 价格 / $1 起充 / 余额永不过期 / 模型实验室免费试跑),收录总数达 173+

‎data/daily_check_cache.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@
9595
"msg": "HTTP 200"
9696
},
9797
"teamorouter.com": {
98-
"alive": false,
99-
"date": "2026-08-22",
100-
"msg": "Page.goto: Timeout 10000ms exceeded.\nCall log:\n - navigatin"
98+
"alive": true,
99+
"date": "2026-11-08",
100+
"msg": "HTTP 200(人工复核,反爬拦截不代表失效)"
101101
},
102102
"tokenrhythm.studio": {
103103
"alive": true,
@@ -379,4 +379,4 @@
379379
"date": "2026-08-22",
380380
"msg": "Page.goto: net::ERR_HTTP_RESPONSE_CODE_FAILURE at https://au"
381381
}
382-
}
382+
}

‎data/site_status.json‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,6 @@
242242
"name": "大模型API (DMXAPI)",
243243
"domain": "dmxapi.com",
244244
"reason": "Page.goto: Timeout 10000ms exceeded.\nCall log:\n - navigatin"
245-
},
246-
{
247-
"url": "https://teamorouter.com",
248-
"name": "TeamoRouter",
249-
"domain": "teamorouter.com",
250-
"reason": "Page.goto: Timeout 10000ms exceeded.\nCall log:\n - navigatin"
251245
}
252246
]
253-
}
247+
}

‎scripts/crawler_v3.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,17 @@ def check_site_alive(self, url: str) -> Tuple[bool, str]:
348348
# 第1级: HEAD
349349
try:
350350
resp = self.session.head(url, timeout=5, allow_redirects=True)
351-
if resp.status_code == 200:
351+
# 403/429 多为 Cloudflare 等反爬拦截,站点本身在线,不能判为失效
352+
if resp.status_code in (200, 401, 403, 429):
352353
self.check_cache[domain] = {'alive': True, 'date': today, 'msg': f"HTTP {resp.status_code}"}
353354
return True, f"HTTP {resp.status_code}"
354355
except:
355356
pass
356357
# 第2级: GET
357358
ok, result = self.http_get(url, timeout=8)
359+
if result in ("HTTP 401", "HTTP 403", "HTTP 429"):
360+
self.check_cache[domain] = {'alive': True, 'date': today, 'msg': f"{result}(反爬拦截,站点在线)"}
361+
return True, f"{result}(反爬拦截,站点在线)"
358362
if ok:
359363
try:
360364
soup = BeautifulSoup(result, 'html.parser')

‎scripts/daily_check.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def check_availability(self, url):
180180
response = self.session.head(url, timeout=10, allow_redirects=True)
181181
elapsed = time.time() - start_time
182182

183-
if response.status_code < 400:
183+
if response.status_code < 400 or response.status_code in (401, 403, 429):
184184
return {
185185
"status": "online",
186186
"response_time": round(elapsed * 1000, 2),

‎scripts/weekly_check.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def check_availability(self, url):
7171
response = self.session.head(url, timeout=15, allow_redirects=True)
7272
elapsed = time.time() - start_time
7373

74-
if response.status_code < 400:
74+
if response.status_code < 400 or response.status_code in (401, 403, 429):
7575
return {
7676
"status": "online",
7777
"response_time": round(elapsed * 1000, 2),
@@ -84,7 +84,7 @@ def check_availability(self, url):
8484
response.close()
8585
elapsed = time.time() - start_time
8686

87-
if response.status_code < 400:
87+
if response.status_code < 400 or response.status_code in (401, 403, 429):
8888
return {
8989
"status": "online",
9090
"response_time": round(elapsed * 1000, 2),

0 commit comments

Comments
 (0)