feat(x): парсинг X через api.fxtwitter.com — 30 живых хендлов как источники, адаптер x_user, полный текст твитов, метрики; старый syndication-путь (429) убран

This commit is contained in:
Vlad Gothbreach
2026-10-26 19:33:35 +03:00
parent f5eef56a3b
commit cfb8639c67
4 changed files with 122 additions and 26 deletions

View File

@@ -648,7 +648,15 @@ def _models_dev(src, limit):
return out
def _x_user(src, limit=12):
"""Лента X-аккаунта через api.fxtwitter.com (без ключей)."""
from .providers import x as xp
handle = (src.extra or {}).get("handle") or src.url.rsplit("/", 1)[-1]
return xp.profile(handle, limit=max(4, min(limit, 25)))
ADAPTERS = {
"x_user": _x_user,
"rss": _rss,
"generic_json": _generic_json,
"or_models": _or_models,