AI Skill Hub 强烈推荐:X推文自动爬虫 是一款优质的Agent工作流。AI 综合评分 8.2 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
无需登录和API密钥,自动化爬取Twitter/X推文、回复、时间线和文章内容的开源工具。支持AI工作流集成,适合数据分析、舆情监测、信息采集等场景,开发者和研究人员常用。
X推文自动爬虫 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
无需登录和API密钥,自动化爬取Twitter/X推文、回复、时间线和文章内容的开源工具。支持AI工作流集成,适合数据分析、舆情监测、信息采集等场景,开发者和研究人员常用。
X推文自动爬虫 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install x-tweet-fetcher
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install x-tweet-fetcher
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/ythx-101/x-tweet-fetcher
cd x-tweet-fetcher
pip install -e .
# 验证安装
python -c "import x_tweet_fetcher; print('安装成功')"
# 命令行使用
x-tweet-fetcher --help
# 基本用法
x-tweet-fetcher input_file -o output_file
# Python 代码中调用
import x_tweet_fetcher
# 示例
result = x_tweet_fetcher.process("input")
print(result)
# x-tweet-fetcher 配置文件示例(config.yml) app: name: "x-tweet-fetcher" debug: false log_level: "INFO" # 运行时指定配置文件 x-tweet-fetcher --config config.yml # 或通过环境变量配置 export X_TWEET_FETCHER_API_KEY="your-key" export X_TWEET_FETCHER_OUTPUT_DIR="./output"
python3 scripts/fetch_tweet.py --list 1455045069516357634 --backend browser ```
| Backend | Deps | Speed | Features |
|---|---|---|---|
| **nitter** | None (stdlib only) | ⚡ Fast | Timeline, search, replies, profile, mentions |
| **browser** | Playwright/Chromium | 🐢 Slower | Everything above + **Lists** + **Articles** + **fetch_china** |
| **auto** (default) | Best available | ⚡→🐢 | Tries nitter first, falls back to browser |
OpenClaw users: Playwright + Chromium are built-in. --backend auto just works — no extra install needed.
| Feature | Backend | Output |
|---|---|---|
| Single tweet | FxTwitter (always) | text, stats, media, quotes |
| Reply comments | nitter / browser | threaded comment list |
| User timeline | nitter / browser | paginated tweet list |
| @mentions monitor | nitter / browser | incremental new mentions |
| Keyword search | nitter / browser | real-time tweet stream |
| **X Lists** | **browser only** | list member tweets |
| **X Articles** | **browser only** | full long-form content |
| User profile analysis | nitter + LLM | MBTI, Big Five, topic graph |
| WeChat article search | Sogou (direct HTTP) | title, url, author, date |
| **WeChat/Weibo/Bilibili** | **browser only** | via fetch_china.py |
| Tweet growth tracker | FxTwitter API | growth curves, burst detection |
For AI Agents: All output is structured JSON. Import as Python modules for direct integration. Exit codes are cron-friendly (0=nothing new,1=new content).
python3 scripts/fetch_tweet.py --user YuLin807 --limit 10
python3 scripts/fetch_tweet.py --user elonmusk --backend nitter
python3 scripts/fetch_tweet.py --list 1455045069516357634 --backend browser
Python 3.7+ (that's it for nitter mode)
| Mode | Extra requirement |
|---|---|
--backend nitter | Nothing (Python stdlib only) |
--backend browser | pip install playwright + playwright install chromium |
--backend auto | Uses whatever is available |
```bash
⚠️ Public Nitter instances are dead or unreliable (as of March 2026). Self-hosting is the only reliable option.
```bash
curl https://nim-lang.org/choosenim/init.sh -sSf | sh export PATH=$HOME/.nimble/bin:$PATH
#### 2. Build Nitter
bash git clone https://github.com/zedeus/nitter cd nitter nimble build -d:release nimble scss cp nitter.example.conf nitter.conf
#### 3. Get X session cookies
Use a **secondary account** (not your main).
1. Log into X in browser → DevTools → Application → Cookies → `x.com`
2. Copy `auth_token` and `ct0`
3. Create `sessions.jsonl`:
json {"kind":"cookie","username":"myaccount","authToken":"YOUR_AUTH_TOKEN","ct0":"YOUR_CT0"}
#### 4. Configure
ini [Server] address = "127.0.0.1" # Local only! port = 8788
[Config] hmacKey = "$(openssl rand -hex 32)"
[Tokens] tokenFile = "sessions.jsonl"
#### 5. Run & test
bash sudo systemctl start redis-server ./nitter
Exit codes for automation: 0=nothing new, 1=new content, 2=error.
```bash
高效实用的推文采集工具,无API限制,与AI工作流深度集成。代码开源维护活跃,社区认可度高。适合自动化数据采集场景。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,X推文自动爬虫 是一款质量优秀的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | x-tweet-fetcher |
| Topics | 推文爬虫自动化采集无APIAI工作流开源工具 |
| GitHub | https://github.com/ythx-101/x-tweet-fetcher |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-24 · 更新时间:2026-05-24 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端