返回顶部
x

x-tweet-fetcherX推文获取器

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
4,068
下载量
免费
免费
12
收藏
概述
安装方式
版本历史

x-tweet-fetcher

X Tweet 获取器

无需认证即可从X/Twitter获取推文。使用FxTwitter API。

可获取内容

内容类型支持情况
普通推文✅ 完整文本 + 统计数据
长推文(Twitter Blue)
✅ 完整文本 | | X文章(长文) | ✅ 完整文章文本 | | 引用推文 | ✅ 包含 | | 统计数据(点赞/转发/浏览) | ✅ 包含 |

使用方法

命令行

bash

JSON输出


python3 scripts/fetch_tweet.py --url https://x.com/user/status/123456

美化JSON

python3 scripts/fetch_tweet.py --url https://x.com/user/status/123456 --pretty

仅文本(人类可读)

python3 scripts/fetch_tweet.py --url https://x.com/user/status/123456 --text-only

在Agent代码中使用

python
from scripts.fetchtweet import fetchtweet

result = fetch_tweet(https://x.com/user/status/123456)
tweet = result[tweet]

普通推文

print(tweet[text])

X文章(长文)

if tweet[is_article]: print(tweet[article][title]) print(tweet[article][full_text]) # 完整文章 print(tweet[article][word_count])

输出格式

json
{
url: https://x.com/user/status/123,
username: user,
tweet_id: 123,
tweet: {
text: 推文内容...,
author: 显示名称,
screen_name: 用户名,
likes: 100,
retweets: 50,
bookmarks: 25,
views: 10000,
replies_count: 30,
created_at: Mon Jan 01 12:00:00 +0000 2026,
isnotetweet: false,
is_article: true,
article: {
title: 文章标题,
full_text: 完整文章内容...,
word_count: 4847,
char_count: 27705
}
}
}

系统要求

  • - Python 3.7+
  • 无外部包依赖(仅使用标准库)
  • 无需API密钥
  • 无需登录

工作原理

使用FxTwitter公共API(api.fxtwitter.com),该API代理X/Twitter内容。文章以结构化块的形式返回,并重新组装为完整文本。

局限性

  • - 无法获取回复线程(仅可通过replies_count字段获取回复数量)
- 回复内容需要浏览器自动化依赖(Camofox/Nitter) - 已移除这些依赖以保持零依赖架构 - --replies标志存在但返回解释性错误信息
  • - 无法获取已删除或私密推文
  • 速率限制取决于FxTwitter服务的可用性
  • 如果FxTwitter服务不可用,该技能将无法工作(无备用方案)

文件结构

skills/x-tweet-fetcher/
├── SKILL.md (本文件)
└── scripts/
└── fetch_tweet.py (单文件,零依赖)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 x-tweet-fetcher-1776375549 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 x-tweet-fetcher-1776375549 技能

通过命令行安装

skillhub install x-tweet-fetcher-1776375549

下载

⬇ 下载 x-tweet-fetcher v0.1.0(免费)

文件大小: 4.8 KB | 发布时间: 2026-4-17 16:36

v0.1.0 最新 2026-4-17 16:36
Initial release—fetches tweets and articles from X/Twitter with no API keys or dependencies.

- Fetches regular tweets, long tweets (Twitter Blue), quoted tweets, and complete X Articles.
- Returns full tweet stats: likes, retweets, bookmarks, views, and reply counts.
- CLI and importable Python API supported; outputs JSON or plain text.
- Zero dependencies: runs on Python 3.7+ standard library.
- Requires no authentication; leverages the public FxTwitter API.
- Cannot fetch reply threads (only reply counts) or access deleted/private tweets.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部