Commit graph

6 commits

Author SHA1 Message Date
vrubelroman
7ef5875f58 authenticate outgoing lichess.org requests to fix silent 404s on games/user
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 12s
Lichess started rejecting anonymous requests to games/user and
user/activity with a 404 (confirmed live: the same request with a valid
bearer token got a normal 429 instead), which our code silently read as
"user has no games" for every single tracked player, making periodic
checks report zero activity across the board. Add LICHESS_APP_TOKEN and
send it as a Bearer token on these two calls; it just needs to be any
valid token; it does not need to belong to the tracked player.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 23:01:35 +00:00
vrubelroman
d479e14bf9 add per-game accuracy and outcome table to stats/notifications
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 31s
Games-of-period responses can now include a per-game breakdown
(include_games) with Lichess post-analysis accuracy, plus which side
the tracked player was on and their rating change for that game.

- lichess_client.py requests accuracy=true from Lichess; stats_service
  computes per-mode average accuracy and builds GameRow entries
  (tracked_is_white, tracked_rating_diff) for blitz/rapid/classical
- /games/{username}/period gained an include_games query param
- formatters.py renders a column-aligned monospace table per game:
  outcome circle (win/loss/draw relative to the tracked player),
  rating change, accuracy, names/ratings, result — for today/yesterday
  and periodic notifications; week keeps an aggregate accuracy line
- usernames are Markdown-escaped before formatting since messages are
  now sent with parse_mode='Markdown'
2026-07-03 09:38:51 +00:00
vrubel
20f96d0e0a fix critical bugs 2026-02-05 01:38:33 +03:00
vrubelroman
4dc5539da2 bug today 2025-11-20 03:14:06 +03:00
vrubelroman
24d53e731a rate limiter 0.2 sec 2025-11-18 15:10:19 +03:00
vrubelroman
a08fc8c962 Создание единого проекта Lichess Statistics Ecosystem
- Объединены три проекта в один репозиторий
- LichessWebServices - REST API для статистики
- LichessClientTG_bot - Telegram бот с поддержкой множества пользователей
- LichessWebView - Веб-интерфейс для просмотра пользователей и игроков
- Добавлен общий docker-compose.yml для запуска всех сервисов
- Добавлен скрипт start.sh для удобного запуска
- Добавлен README с полным описанием проекта
2025-10-26 20:23:26 +03:00