абузы: free-панели new-api на вкладке (роут /api/panels + грид), CSS вынесен из JS, панельный классификатор даёт freeapi-вес, тесты
Some checks failed
ci / test (3.10) (push) Has been cancelled
ci / test (3.11) (push) Has been cancelled
ci / test (3.12) (push) Has been cancelled

This commit is contained in:
Vlad Gothbreach
2026-10-27 02:06:32 +03:00
parent b09cb5f873
commit 16512bf4a1
21 changed files with 1386 additions and 130 deletions

View File

@@ -141,6 +141,13 @@ def _qualifies(source, title, text, tags):
sc -= 26
if not hits:
return 0, []
src0 = str(source or "")
# new-api панели: «N бесплатных моделей (цена 0)» — это готовая абуз-поверхность
if src0.startswith("pn_"):
m = re.search(r"(\d{1,4})\s*бесплатн\w*\s*модел", blob, re.I)
if m:
cnt = min(int(m.group(1)), 500)
return 40 + min(cnt // 10, 30), ["freeapi"]
raw_key = bool(re.search(r"\b(sk-[A-Za-z0-9_\-]{20,}|gh[pousr]_[A-Za-z0-9]{20,})", blob))
src = str(source or "")
known_prefix = src.startswith(("ab_", "tg_", "rad_", "reddit_", "discourse_", "xenforo", "pn_", "gh_", "hn_"))