openclaw - 💡(How to fix) Fix 🔍 调研:Nitter 失效 — X/Twitter 数据抓取替代方案 [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#56288Fetched 2026-04-08 01:42:44
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1locked ×1
RAW_BUFFERClick to expand / collapse

🔍 调研:Nitter 替代方案 — X/Twitter 数据抓取

背景

我们的 X/Twitter 数据获取依赖本地 Nitter 实例 (127.0.0.1:8788),但当前已失效

  • Nitter 进程在跑,首页能访问
  • guest_accounts.jsonl 为空 → 所有用户/推文请求返回 404
  • Twitter/X 持续封杀 guest token,Nitter 官方项目已归档(原作者 zedeus 已停止维护)

我们依赖 Nitter 的场景

功能脚本用途
X mentions 监控x_mentions_nitter.py每30分钟扫描 @YuLin807 的 mentions
用户时间线nitter_client.py --timeline获取用户最近推文
推文搜索nitter_client.py --search关键词搜索推文
林月推文扫描x-todo-scanner cron扫林月推文提取任务
tweet-growth 追踪tweet_growth.py追踪推文互动数据

当前还能用的方案

  • FxTwitter API (fetch_tweet.py):能抓单条推文(给定 URL),不需要登录
  • Camofox/Playwright:浏览器自动化,能做时间线/回复,但重、慢、不稳定
  • x_discover.py:通过搜索引擎间接搜 X 内容

需要调研的方向

  1. Nitter 修复:能否获取新的 guest token?社区 fork(如 HerMajestyDragon/nitter)有没有解决方案?
  2. Twitter/X API 官方:免费 tier 够不够用?Basic ($200/月) 太贵
  3. 第三方 API 服务:RapidAPI 上的 Twitter scraper、SocialData.tools、Tweetscape 等
  4. 自建 scraper:直接用 HTTP 请求 + 轮换 bearer token,不依赖 Nitter
  5. RSS Bridge 或其他替代 proxy
  6. FixTweet/FxTwitter 扩展用法:能否用它做时间线/搜索而不只是单条推文?

评估标准

  • 🆓 免费或极低成本
  • 🤖 可自动化(cron 友好)
  • 📊 覆盖:mentions 监控 + 时间线 + 搜索
  • 🔒 不需要登录 X 账号(或只需要一次性配置)
  • ⚡ 轻量(不要浏览器依赖)

期望输出

  • 各方案的可行性对比表
  • 推荐方案 + 迁移计划
  • 如果能修 Nitter,给出具体步骤

extent analysis

Fix Plan

To address the issue of Nitter's guest token being blocked and the official project being archived, we will explore an alternative solution using Twitter's official API.

Here are the steps to implement this solution:

  • Create a Twitter Developer account and apply for a Twitter API key
  • Use the Twitter API to fetch tweets and mentions
  • Implement a cron job to run the script periodically

Example code using Python and the Tweepy library:

import tweepy

# Twitter API credentials
consumer_key = "your-consumer-key"
consumer_secret = "your-consumer-secret"
access_token = "your-access-token"
access_token_secret = "your-access-token-secret"

# Set up OAuth and integrate with API
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)

# Fetch tweets and mentions
def fetch_tweets(username):
    tweets = api.user_timeline(screen_name=username, count=100)
    return tweets

def fetch_mentions(username):
    mentions = api.search_tweets(q="@" + username, count=100)
    return mentions

# Example usage
username = "YuLin807"
tweets = fetch_tweets(username)
mentions = fetch_mentions(username)

# Print the results
for tweet in tweets:
    print(tweet.text)

for mention in mentions:
    print(mention.text)

Verification

To verify that the fix worked, you can check the following:

  • The script runs successfully without any errors
  • The tweets and mentions are fetched correctly and printed to the console
  • The cron job runs the script periodically and fetches new tweets and mentions

Extra Tips

  • Make sure to replace the your-consumer-key, your-consumer-secret, your-access-token, and your-access-token-secret placeholders with your actual Twitter API credentials
  • You can adjust the count parameter in the user_timeline and search_tweets methods to fetch more or fewer tweets and mentions
  • You can also use other Tweepy methods to fetch different types of data, such as user information or tweet replies.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix 🔍 调研:Nitter 失效 — X/Twitter 数据抓取替代方案 [1 comments, 2 participants]