X Reader
Universal content reader โ fetch, normalize, and digest content from 7+ platforms (WeChat, Telegram, X, YouTube, Bilibili, Xiaohongshu, RSS)
Installation
npx x-readerAsk AI about X Reader
Powered by Claude ยท Grounded in docs
I know everything about X Reader. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
x-reader
Universal content reader โ fetch, transcribe, and digest content from any platform.
Give it a URL (article, video, podcast, tweet), get back structured content. Works as CLI, Python library, MCP server, or Claude Code skills.
็ฎไฝไธญๆ๏ผ README.zh-CN.md
What It Does
Any URL โ Platform Detection โ Fetch Content โ Unified Output
โ โ
auto-detect text: Jina Reader
7+ platforms video: yt-dlp subtitles
audio: Whisper transcription
API: Bilibili / RSS / Telegram
The Python layer handles text fetching and YouTube subtitle extraction. The Claude Code skills (optional) add full Whisper transcription for video/podcast and AI-powered content analysis.
Three Layers
x-reader is composable. Use the layers you need:
| Layer | What | Format | Install |
|---|---|---|---|
| Python CLI/Library | Basic content fetching + unified schema | See Install | Required |
| Claude Code Skills | Video transcription + AI analysis | Copy skills/ to ~/.claude/skills/ | Optional |
| MCP Server | Expose reading as MCP tools | python mcp_server.py | Optional |
Layer 1: Python CLI
# Fetch any URL
x-reader https://mp.weixin.qq.com/s/abc123
# Fetch a tweet
x-reader https://x.com/elonmusk/status/123456
# Fetch multiple URLs
x-reader https://url1.com https://url2.com
# Login to a platform (one-time, for browser fallback)
x-reader login xhs
# View inbox
x-reader list
Layer 2: Claude Code Skills
Requires cloning the repo (not included in pip install).
For video/podcast transcription and content analysis:
skills/
โโโ video/ # YouTube/Bilibili/podcast โ full transcript via Whisper
โโโ analyzer/ # Any content โ structured analysis report
Install:
cp -r skills/video ~/.claude/skills/video
cp -r skills/analyzer ~/.claude/skills/analyzer
Then in Claude Code, just send a YouTube/Bilibili/podcast link โ the video skill auto-triggers and produces a full transcript + summary.
Layer 3: MCP Server
Requires cloning the repo (mcp_server.py is not included in pip install).
git clone https://github.com/runesleo/x-reader.git
cd x-reader
pip install -e ".[mcp]"
python mcp_server.py
Tools exposed:
read_url(url)โ fetch any URLread_batch(urls)โ fetch multiple URLs concurrentlylist_inbox()โ view previously fetched contentdetect_platform(url)โ identify platform from URL
Claude Code config (~/.claude/claude_desktop_config.json):
{
"mcpServers": {
"x-reader": {
"command": "python",
"args": ["/path/to/x-reader/mcp_server.py"]
}
}
}
Supported Platforms
| Platform | Text Fetch | Video/Audio Transcript |
|---|---|---|
| YouTube | โ Jina | โ yt-dlp subtitles โ Groq Whisper fallback |
| Bilibili (B็ซ) | โ API | โ via Claude Code skill |
| X / Twitter | โ Jina โ Playwright | โ |
| WeChat (ๅพฎไฟกๅ ฌไผๅท) | โ Jina โ Playwright | โ |
| Xiaohongshu (ๅฐ็บขไนฆ) | โ Jina โ Playwright* | โ |
| Telegram | โ Telethon | โ |
| RSS | โ feedparser | โ |
| ๅฐๅฎๅฎ (Xiaoyuzhou) | โ | โ via Claude Code skill |
| Apple Podcasts | โ | โ via Claude Code skill |
| Any web page | โ Jina fallback | โ |
*XHS requires a one-time login:
x-reader login xhs(saves session for Playwright fallback)YouTube Whisper transcription requires
GROQ_API_KEYโ get a free key from Groq
Install
# From GitHub (recommended)
pip install git+https://github.com/runesleo/x-reader.git
# With Telegram support
pip install "x-reader[telegram] @ git+https://github.com/runesleo/x-reader.git"
# With browser fallback (Playwright โ for XHS/WeChat anti-scraping)
pip install "x-reader[browser] @ git+https://github.com/runesleo/x-reader.git"
playwright install chromium
# With all optional dependencies
pip install "x-reader[all] @ git+https://github.com/runesleo/x-reader.git"
playwright install chromium
Or clone and install locally:
git clone https://github.com/runesleo/x-reader.git
cd x-reader
pip install -e ".[all]"
playwright install chromium
Dependencies for video/audio (optional)
# macOS
brew install yt-dlp ffmpeg
# Linux
pip install yt-dlp
apt install ffmpeg
For Whisper transcription, get a free API key from Groq and set:
export GROQ_API_KEY=your_key_here
Use as Library
import asyncio
from x_reader.reader import UniversalReader
async def main():
reader = UniversalReader()
content = await reader.read("https://mp.weixin.qq.com/s/abc123")
print(content.title)
print(content.content[:200])
asyncio.run(main())
Configuration
Copy .env.example to .env:
cp .env.example .env
| Variable | Required | Description |
|---|---|---|
TG_API_ID | Telegram only | From https://my.telegram.org |
TG_API_HASH | Telegram only | From https://my.telegram.org |
GROQ_API_KEY | Whisper only | From https://console.groq.com/keys (free) |
INBOX_FILE | No | Path to inbox JSON (default: ./unified_inbox.json) |
OUTPUT_DIR | No | Directory for Markdown output (default: disabled) |
OBSIDIAN_VAULT | No | Path to Obsidian vault (writes to 01-ๆถ้็ฎฑ/x-reader-inbox.md) |
Architecture
x-reader/
โโโ x_reader/ # Python package
โ โโโ cli.py # CLI entry point
โ โโโ reader.py # URL dispatcher (UniversalReader)
โ โโโ schema.py # Unified data model (UnifiedContent + Inbox)
โ โโโ login.py # Browser login manager (saves sessions)
โ โโโ fetchers/
โ โ โโโ jina.py # Jina Reader (universal fallback)
โ โ โโโ browser.py # Playwright headless (anti-scraping fallback)
โ โ โโโ bilibili.py # Bilibili API
โ โ โโโ youtube.py # yt-dlp subtitle extraction
โ โ โโโ rss.py # feedparser
โ โ โโโ telegram.py # Telethon
โ โ โโโ twitter.py # Jina-based
โ โ โโโ wechat.py # Jina โ Playwright fallback
โ โ โโโ xhs.py # Jina โ Playwright + session fallback
โ โโโ utils/
โ โโโ storage.py # JSON + Markdown dual output
โโโ skills/ # Claude Code skills
โ โโโ video/ # Video/podcast โ transcript + summary
โ โโโ analyzer/ # Content โ structured analysis
โโโ mcp_server.py # MCP server entry point
โโโ pyproject.toml
How the Layers Work Together
User sends URL
โ
โโ Text content (article, tweet, WeChat)
โ โโ Python fetcher โ UnifiedContent โ inbox
โ
โโ Video (YouTube, Bilibili, X video)
โ โโ Python fetcher โ metadata (title, description)
โ โโ Video skill โ full transcript via subtitles/Whisper
โ
โโ Podcast (ๅฐๅฎๅฎ, Apple Podcasts)
โ โโ Video skill โ full transcript via Whisper
โ
โโ Analysis requested
โโ Analyzer skill โ structured report + action items
Star History
Author
Leo (@runes_leo) โ AI ร Crypto independent builder. Trading on Polymarket, building data and trading systems with Claude Code and Codex.
leolabs.me โ writing ยท community ยท open-source tools ยท indie projects ยท all platforms.
X Subscription โ paid content weekly, or just buy me a coffee ๐
Learn in public, Build in public.
License
MIT
