x-tweet-fetcher by ythx-101/x-tweet-fetcher
npx skills add https://github.com/ythx-101/x-tweet-fetcher --skill x-tweet-fetcher无需认证即可从 X/Twitter 抓取推文。支持推文内容、回复线程、用户时间线、中文平台以及推文增长追踪。
| 功能 | 命令 | 依赖项 |
|---|---|---|
| 单条推文 | --url <tweet_url> | 无(零依赖) |
| 回复线程 | --url <tweet_url> --replies | Camofox |
| 用户时间线 | --user <username> --limit 300 | Camofox |
| 中文平台 | fetch_china.py --url <url> |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| Camofox(微信除外) |
| 谷歌搜索 | camofox_search("query") | Camofox |
| X-Tracker(增长) | tweet_growth_cli.py --add/--run/--report | 无(零依赖) |
# JSON 输出
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"
# 仅文本(人类可读)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --text-only
# 美化 JSON
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --pretty
| 内容类型 | 支持情况 |
|---|---|
| 常规推文 | ✅ 全文 + 统计数据 |
| 长推文(Twitter Blue) | ✅ 全文 |
| X 文章(长文) | ✅ 完整文章文本 |
| 引用推文 | ✅ 包含 |
| 统计数据(点赞/转发/浏览量) | ✅ 包含 |
| 媒体 URL | ✅ 图片 + 视频 |
⚠️ 以下功能需要 Camofox 浏览器服务运行在
localhost:9377。请参阅下方的 Camofox 设置。
# 抓取推文 + 所有回复(包括嵌套回复)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies
# 仅文本模式抓取回复
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies --text-only
# 抓取用户最新推文(支持分页,MAX_PAGES=20)
python3 scripts/fetch_tweet.py --user <username> --limit 300
# 根据 URL 自动检测平台
python3 scripts/fetch_china.py --url "https://weibo.com/..." # 微博
python3 scripts/fetch_china.py --url "https://bilibili.com/..." # Bilibili
python3 scripts/fetch_china.py --url "https://csdn.net/..." # CSDN
python3 scripts/fetch_china.py --url "https://mp.weixin.qq.com/..." # 微信(无需 Camofox!)
| 平台 | 状态 | 备注 |
|---|---|---|
| 微信公众号文章 | ✅ | 直接使用 web_fetch,无需 Camofox |
| 微博 | ✅ | Camofox 渲染 JS |
| Bilibili | ✅ | 视频信息 + 统计数据 |
| CSDN | ✅ | 文章 + 代码块 |
| 知乎 / 小红书 | ⚠️ | 需要导入 cookie 登录 |
# Python
from scripts.camofox_client import camofox_search
results = camofox_search("your search query")
# 返回: [{"title": "...", "url": "...", "snippet": "..."}, ...]
# CLI
python3 scripts/camofox_client.py "your search query"
使用 Camofox 浏览器直接搜索谷歌。无需 Brave API 密钥,无费用。
Camofox 是一个基于 Camoufox 的反检测浏览器服务(一个具有 C++ 级别指纹掩码的 Firefox 分支)。它可以绕过:
选项 1:OpenClaw 插件
openclaw plugins install @askjo/camofox-browser
选项 2:手动安装
git clone https://github.com/jo-inc/camofox-browser
cd camofox-browser
npm install && npm start
curl http://localhost:9377/health
# 应返回: {"status":"ok"}
# 创建标签页
POST http://localhost:9377/tabs
Body: {"userId":"test", "sessionKey":"test", "url":"https://example.com"}
# 获取页面快照
GET http://localhost:9377/tabs/<TAB_ID>/snapshot?userId=test
# 关闭标签页
DELETE http://localhost:9377/tabs/<TAB_ID>?userId=test
from scripts.fetch_tweet import fetch_tweet
result = fetch_tweet("https://x.com/user/status/123456")
tweet = result["tweet"]
# 常规推文
print(tweet["text"])
print(f"Likes: {tweet['likes']}, Views: {tweet['views']}")
# X 文章(长文)
if tweet.get("is_article"):
print(tweet["article"]["title"])
print(tweet["article"]["full_text"])
# 在回复中找到的链接
for reply in result.get("replies", []):
for link in reply.get("links", []):
print(link)
{
"url": "https://x.com/user/status/123",
"username": "user",
"tweet_id": "123",
"tweet": {
"text": "Tweet content...",
"author": "Display Name",
"screen_name": "username",
"likes": 100,
"retweets": 50,
"bookmarks": 25,
"views": 10000,
"replies_count": 30,
"created_at": "Mon Jan 01 12:00:00 +0000 2026",
"is_note_tweet": false,
"is_article": true,
"article": {
"title": "Article Title",
"full_text": "Complete article content...",
"word_count": 4847
}
},
"replies": [
{
"author": "@someone",
"text": "Reply text...",
"likes": 5,
"links": ["https://github.com/..."],
"thread_replies": [{"text": "Nested reply..."}]
}
]
}
x-tweet-fetcher/
├── SKILL.md # 本文件
├── README.md # GitHub 页面,包含完整文档
├── scripts/
│ ├── fetch_tweet.py # 主抓取器(推文 + 回复 + 时间线)
│ ├── fetch_china.py # 中文平台抓取器
│ ├── camofox_client.py # Camofox REST API 客户端 + camofox_search()
│ └── x-profile-analyzer.py # 用户资料分析(AI 驱动)
└── CHANGELOG.md
追踪推文增长并检测病毒式传播时刻——灵感来源于半导体 ETCH 端点检测。
# 添加要追踪的推文
python3 scripts/tweet_growth_cli.py --add "https://x.com/user/status/123" "my launch tweet"
# 列出所有追踪的推文
python3 scripts/tweet_growth_cli.py --list
# 运行采样(新推文 <48h,每 15 分钟)
python3 scripts/tweet_growth_cli.py --run --fast
# 运行采样(所有推文,每小时)
python3 scripts/tweet_growth_cli.py --run --normal
# 生成分析报告
python3 scripts/tweet_growth_cli.py --report 123456789
# 包含主题交叉分析的报告
python3 scripts/tweet_growth_cli.py --report 123456789 --cross
# 双频采样
*/15 * * * * python3 tweet_growth_cli.py --run --fast # 新推文 (<48h)
0 * * * * python3 tweet_growth_cli.py --run --normal # 所有推文(每小时)
| 组件 | 方法 | 目的 |
|---|---|---|
| 导数检测 | 每小时 dV/dt | 发现突然加速 |
| 滑动窗口 | 5 样本移动平均 | 过滤噪声 |
| 多信号融合 | 浏览量×1 + 点赞×1 + 收藏×1.5 + 转发×3 | 加权综合得分 |
| 爆发确认 | 连续 3 个窗口超过阈值 | 防止误报 |
| 激增覆盖 | 单窗口 +100%/h | 捕捉大规模峰值 |
| 饱和 | 6 个样本增长 < 2%/h | 检测长尾 |
| 传播 | 每千次浏览的转发率 | 区分影响者驱动与算法驱动 |
🎯 在 2026-03-14 08:45 检测到爆发
- 增长率: 156%/h
- 综合得分: +2847(浏览量 +1200,转发 +89,点赞 +234)
- 传播: 12.3 转发/千次浏览(影响者驱动)
每周安装量
292
仓库
GitHub 星标
721
首次出现
2026年2月14日
安全审计
安装于
codex273
opencode270
gemini-cli265
github-copilot259
cursor258
kimi-cli257
Fetch tweets from X/Twitter without authentication. Supports tweet content, reply threads, user timelines, Chinese platforms, and tweet growth tracking.
| Feature | Command | Dependencies |
|---|---|---|
| Single tweet | --url <tweet_url> | None (zero deps) |
| Reply threads | --url <tweet_url> --replies | Camofox |
| User timeline | --user <username> --limit 300 | Camofox |
| Chinese platforms | fetch_china.py --url <url> | Camofox (except WeChat) |
| Google search | camofox_search("query") | Camofox |
| X-Tracker (growth) | tweet_growth_cli.py --add/--run/--report | None (zero deps) |
# JSON output
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456"
# Text only (human readable)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --text-only
# Pretty JSON
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --pretty
| Content Type | Support |
|---|---|
| Regular tweets | ✅ Full text + stats |
| Long tweets (Twitter Blue) | ✅ Full text |
| X Articles (long-form) | ✅ Complete article text |
| Quoted tweets | ✅ Included |
| Stats (likes/RT/views) | ✅ Included |
| Media URLs | ✅ Images + videos |
⚠️ The following features require Camofox browser service running on
localhost:9377. See Camofox Setup below.
# Fetch tweet + all replies (including nested replies)
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies
# Text-only mode with replies
python3 scripts/fetch_tweet.py --url "https://x.com/user/status/123456" --replies --text-only
# Fetch latest tweets from a user (supports pagination, MAX_PAGES=20)
python3 scripts/fetch_tweet.py --user <username> --limit 300
# Auto-detects platform from URL
python3 scripts/fetch_china.py --url "https://weibo.com/..." # Weibo
python3 scripts/fetch_china.py --url "https://bilibili.com/..." # Bilibili
python3 scripts/fetch_china.py --url "https://csdn.net/..." # CSDN
python3 scripts/fetch_china.py --url "https://mp.weixin.qq.com/..." # WeChat (no Camofox needed!)
| Platform | Status | Notes |
|---|---|---|
| WeChat Articles | ✅ | Uses web_fetch directly, no Camofox |
| ✅ | Camofox renders JS | |
| Bilibili | ✅ | Video info + stats |
| CSDN | ✅ | Articles + code blocks |
| Zhihu / Xiaohongshu | ⚠️ | Needs cookie import for login |
# Python
from scripts.camofox_client import camofox_search
results = camofox_search("your search query")
# Returns: [{"title": "...", "url": "...", "snippet": "..."}, ...]
# CLI
python3 scripts/camofox_client.py "your search query"
Uses Camofox browser to search Google directly. No Brave API key needed, no cost.
Camofox is an anti-detection browser service based on Camoufox (a Firefox fork with C++ level fingerprint masking). It bypasses:
Option 1: OpenClaw Plugin
openclaw plugins install @askjo/camofox-browser
Option 2: Manual Install
git clone https://github.com/jo-inc/camofox-browser
cd camofox-browser
npm install && npm start
curl http://localhost:9377/health
# Should return: {"status":"ok"}
# Create tab
POST http://localhost:9377/tabs
Body: {"userId":"test", "sessionKey":"test", "url":"https://example.com"}
# Get page snapshot
GET http://localhost:9377/tabs/<TAB_ID>/snapshot?userId=test
# Close tab
DELETE http://localhost:9377/tabs/<TAB_ID>?userId=test
from scripts.fetch_tweet import fetch_tweet
result = fetch_tweet("https://x.com/user/status/123456")
tweet = result["tweet"]
# Regular tweet
print(tweet["text"])
print(f"Likes: {tweet['likes']}, Views: {tweet['views']}")
# X Article (long-form)
if tweet.get("is_article"):
print(tweet["article"]["title"])
print(tweet["article"]["full_text"])
# Links found in replies
for reply in result.get("replies", []):
for link in reply.get("links", []):
print(link)
{
"url": "https://x.com/user/status/123",
"username": "user",
"tweet_id": "123",
"tweet": {
"text": "Tweet content...",
"author": "Display Name",
"screen_name": "username",
"likes": 100,
"retweets": 50,
"bookmarks": 25,
"views": 10000,
"replies_count": 30,
"created_at": "Mon Jan 01 12:00:00 +0000 2026",
"is_note_tweet": false,
"is_article": true,
"article": {
"title": "Article Title",
"full_text": "Complete article content...",
"word_count": 4847
}
},
"replies": [
{
"author": "@someone",
"text": "Reply text...",
"likes": 5,
"links": ["https://github.com/..."],
"thread_replies": [{"text": "Nested reply..."}]
}
]
}
x-tweet-fetcher/
├── SKILL.md # This file
├── README.md # GitHub page with full docs
├── scripts/
│ ├── fetch_tweet.py # Main fetcher (tweet + replies + timeline)
│ ├── fetch_china.py # Chinese platform fetcher
│ ├── camofox_client.py # Camofox REST API client + camofox_search()
│ └── x-profile-analyzer.py # User profile analysis (AI-powered)
└── CHANGELOG.md
Track your tweets' growth and detect viral moments — inspired by semiconductor ETCH Endpoint Detection.
# Add a tweet to track
python3 scripts/tweet_growth_cli.py --add "https://x.com/user/status/123" "my launch tweet"
# List all tracked tweets
python3 scripts/tweet_growth_cli.py --list
# Run sampling (new tweets <48h, every 15min)
python3 scripts/tweet_growth_cli.py --run --fast
# Run sampling (all tweets, hourly)
python3 scripts/tweet_growth_cli.py --run --normal
# Generate analysis report
python3 scripts/tweet_growth_cli.py --report 123456789
# Report with topic cross-analysis
python3 scripts/tweet_growth_cli.py --report 123456789 --cross
# Dual-frequency sampling
*/15 * * * * python3 tweet_growth_cli.py --run --fast # New tweets (<48h)
0 * * * * python3 tweet_growth_cli.py --run --normal # All tweets (hourly)
| Component | Method | Purpose |
|---|---|---|
| Derivative detection | dV/dt per hour | Spot sudden acceleration |
| Sliding window | 5-sample moving average | Filter noise |
| Multi-signal fusion | views×1 + likes×1 + bookmarks×1.5 + RT×3 | Weighted composite score |
| Burst confirmation | 3 consecutive windows above threshold | Prevent false positives |
| Surge override | Single window +100%/h | Catch massive spikes |
| Saturation | 6 samples < 2%/h growth | Detect long tail |
| Propagation | RT-per-1k-views ratio | Influencer vs algorithm driven |
🎯 Burst detected at 2026-03-14 08:45
- Growth rate: 156%/h
- Composite score: +2847 (views +1200, RT +89, likes +234)
- Propagation: 12.3 RT/1k views (influencer-driven)
Weekly Installs
292
Repository
GitHub Stars
721
First Seen
Feb 14, 2026
Security Audits
Gen Agent Trust HubFailSocketWarnSnykFail
Installed on
codex273
opencode270
gemini-cli265
github-copilot259
cursor258
kimi-cli257
xdrop 文件传输脚本:Bun 环境下安全上传下载工具,支持加密分享
20,700 周安装