twitter-reader
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTwitter Reader
Twitter/X 帖子内容读取器
Fetch Twitter/X post content without needing JavaScript or authentication.
无需JavaScript或身份验证即可获取Twitter/X帖子内容。
Prerequisites
前提条件
You need a Jina API key to use this skill:
- Visit https://jina.ai/ to sign up (free tier available)
- Get your API key from the dashboard
- Set the environment variable:
bash
export JINA_API_KEY="your_api_key_here"你需要一个Jina API密钥才能使用此技能:
- 访问https://jina.ai/注册(提供免费层级)
- 从控制面板获取你的API密钥
- 设置环境变量:
bash
export JINA_API_KEY="your_api_key_here"Quick Start
快速开始
For a single tweet, use curl directly:
bash
curl "https://r.jina.ai/https://x.com/USER/status/TWEET_ID" \
-H "Authorization: Bearer ${JINA_API_KEY}"For multiple tweets, use the bundled script:
bash
scripts/fetch_tweets.sh url1 url2 url3对于单条推文,直接使用curl:
bash
curl "https://r.jina.ai/https://x.com/USER/status/TWEET_ID" \
-H "Authorization: Bearer ${JINA_API_KEY}"对于多条推文,使用配套脚本:
bash
scripts/fetch_tweets.sh url1 url2 url3What Gets Returned
返回内容
- Title: Post author and content preview
- URL Source: Original tweet link
- Published Time: GMT timestamp
- Markdown Content: Full post text with media descriptions
- 标题:帖子作者及内容预览
- 来源URL:原始推文链接
- 发布时间:GMT时间戳
- Markdown内容:包含媒体描述的完整帖子文本
Bundled Scripts
配套脚本
fetch_tweet.py
fetch_tweet.py
Python script for fetching individual tweets.
bash
python scripts/fetch_tweet.py https://x.com/user/status/123 output.md用于获取单条推文的Python脚本。
bash
python scripts/fetch_tweet.py https://x.com/user/status/123 output.mdfetch_tweets.sh
fetch_tweets.sh
Bash script for batch fetching multiple tweets.
bash
scripts/fetch_tweets.sh \
"https://x.com/user/status/123" \
"https://x.com/user/status/456"用于批量获取多条推文的Bash脚本。
bash
scripts/fetch_tweets.sh \
"https://x.com/user/status/123" \
"https://x.com/user/status/456"URL Formats Supported
支持的URL格式
https://x.com/USER/status/IDhttps://twitter.com/USER/status/ID- (redirects work automatically)
https://x.com/...
https://x.com/USER/status/IDhttps://twitter.com/USER/status/ID- (自动支持重定向)
https://x.com/...
Environment Variables
环境变量
- : Required. Your Jina.ai API key for accessing the reader API
JINA_API_KEY
- :必填。用于访问读取器API的Jina.ai API密钥
JINA_API_KEY