Skip to main content

Universal content reader - fetch from Twitter, Reddit, YouTube, WeChat, and more

Project description

Riocloud Reader

GitHub License Python

Universal content reader โ€” fetch, transcribe, and digest content from 30+ platforms. Combines the best of x-reader and OpenClaw-DeepReeder.

Supported Platforms

Platform Text Fetch Video/Audio Transcript API Key Required Notes
๐Ÿฆ Twitter/X โœ… โ€” โŒ FxTwitter API + Nitter fallback
๐ŸŸ  Reddit โœ… โ€” โŒ Native .json API
๐ŸŽฌ YouTube โœ… โœ… โŒ transcripts in multiple languages
๐Ÿ“ฐ WeChat (ๅพฎไฟกๅ…ฌไผ—ๅท) โœ… โ€” โŒ Jina + Playwright fallback
๐Ÿ“• Xiaohongshu (ๅฐ็บขไนฆ) โœ… โ€” โŒ Playwright with session
๐Ÿ“• Bilibili (B็ซ™) โœ… โœ… โŒ Video metadata + subtitles
๐Ÿ“ก RSS/Atom โœ… โ€” โŒ feedparser
๐Ÿ’ฌ Telegram โœ… โ€” โœ… Telethon (requires API credentials)
๐ŸŒ Generic (any URL) โœ… โ€” โŒ Trafilatura + Jina Reader
๐Ÿ““ NotebookLM โ€” โœ… โœ… Google authentication

Platform Details

๐Ÿฆ Twitter/X

  • Regular tweets with engagement stats (likes, RTs, views, bookmarks)
  • Long tweets (Twitter Blue)
  • X Articles (long-form content)
  • Quoted tweets (nested content)
  • Reply threads (up to 5 via Nitter fallback)
  • Profile snapshots

๐ŸŸ  Reddit

  • Self posts (full markdown body)
  • Link posts (URL + metadata)
  • Top comments (up to 15, sorted by score)
  • Nested reply threads (up to 3 levels deep)
  • Media URLs (images, galleries, videos)
  • Post stats (score, comment count, upvote ratio)
  • Flair tags

๐ŸŽฌ YouTube

  • Video transcripts in multiple languages
  • Metadata (title, description, channel)
  • Support for youtube.com, youtu.be, youtube.com/embed

๐Ÿ“ฐ WeChat (ๅพฎไฟกๅ…ฌไผ—ๅท)

  • Articles from official accounts
  • Jina Reader as primary fetcher
  • Playwright fallback for anti-scraping pages

๐Ÿ“• Xiaohongshu (ๅฐ็บขไนฆ)

  • Notes and posts
  • Images and media URLs
  • Playwright with session for authenticated requests

๐Ÿ“• Bilibili (B็ซ™)

  • Video metadata
  • Subtitles
  • Support for bilibili.com and b23.tv short links

๐Ÿ“ก RSS/Atom

  • Any standard RSS or Atom feed
  • Auto-detection of feed URLs

๐Ÿ’ฌ Telegram

  • Channel messages
  • Requires TG_API_ID and TG_API_HASH from my.telegram.org

๐ŸŒ Generic (Any URL)

  • Any webpage via Trafilatura
  • Jina Reader as fallback
  • Best effort content extraction

๐Ÿ““ NotebookLM (Integration)

  • Upload content as sources
  • Generate Audio Overview (podcast-style)
  • Requires Google authentication

Installation

Basic Install

pip install git+https://github.com/Riocloud/riocloud-reader.git

With All Dependencies

pip install "riocloud-reader[all] @ git+https://github.com/Riocloud/riocloud-reader.git"
playwright install chromium

Optional Dependencies

# Browser support (WeChat, Xiaohongshu)
pip install "riocloud-reader[browser]"

# YouTube transcripts
pip install "riocloud-reader[youtube]"

# Telegram support
pip install "riocloud-reader[telegram]"

# NotebookLM integration
pip install "riocloud-reader[notebooklm]"

# Generic URL parsing
pip install "riocloud-reader[generic]"

# Development
pip install "riocloud-reader[dev]"

Usage

CLI

# Single URL
riocloud-reader https://twitter.com/user/status/123456
riocloud-reader https://youtube.com/watch?v=dQw4w9WgXcQ
riocloud-reader https://reddit.com/r/python/comments/abc123

# Multiple URLs
riocloud-reader https://url1.com https://url2.com

# Save to file
riocloud-reader https://example.com/article --output article.md

Python Library

import asyncio
from riocloud_reader import Reader

async def main():
    reader = Reader()
    
    # Single URL
    content = await reader.read("https://twitter.com/user/status/123456")
    print(content.title)
    print(content.content[:500])
    
    # Batch
    results = await reader.read_batch([
        "https://twitter.com/user/status/1",
        "https://reddit.com/r/python/comments/abc",
    ])

asyncio.run(main())

OpenClaw Skill

from skills.reader import run

# Read content directly into agent memory
result = run("Check out this: https://x.com/elonmusk/status/123456")

MCP Server

# Start MCP server
python -m riocloud_reader.mcp

# Configure in claude_desktop_config.json
{
  "mcpServers": {
    "riocloud-reader": {
      "command": "python",
      "args": ["-m", "riocloud_reader.mcp"]
    }
  }
}

Configuration

Environment Variables

Variable Required Description
TG_API_ID Telegram only From my.telegram.org
TG_API_HASH Telegram only From my.telegram.org
GROQ_API_KEY Whisper only Free from console.groq.com
FIRECRAWL_API_KEY Optional For paywalled content
DEEPREEDER_MEMORY_PATH Optional Where to save content

.env File

cp .env.example .env
# Edit with your credentials

Architecture

riocloud_reader/
โ”œโ”€โ”€ parsers/
โ”‚   โ”œโ”€โ”€ base.py          # Base parser + ParseResult
โ”‚   โ”œโ”€โ”€ twitter.py       # Twitter/X (FxTwitter + Nitter)
โ”‚   โ”œโ”€โ”€ reddit.py        # Reddit (.json API)
โ”‚   โ”œโ”€โ”€ youtube.py       # YouTube transcripts
โ”‚   โ”œโ”€โ”€ wechat.py        # WeChat articles
โ”‚   โ”œโ”€โ”€ xhs.py           # Xiaohongshu
โ”‚   โ”œโ”€โ”€ bilibili.py      # Bilibili
โ”‚   โ”œโ”€โ”€ rss.py           # RSS/Atom
โ”‚   โ”œโ”€โ”€ telegram.py      # Telegram channels
โ”‚   โ””โ”€โ”€ generic.py       # Any URL (Trafilatura)
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ router.py        # URL โ†’ Parser routing
โ”‚   โ”œโ”€โ”€ storage.py       # File I/O
โ”‚   โ””โ”€โ”€ config.py        # Settings
โ”œโ”€โ”€ skills/
โ”‚   โ””โ”€โ”€ reader/          # OpenClaw skill
โ”œโ”€โ”€ integrations/
โ”‚   โ””โ”€โ”€ notebooklm.py   # NotebookLM API
โ”œโ”€โ”€ mcp/
โ”‚   โ””โ”€โ”€ server.py        # MCP server
โ”œโ”€โ”€ reader.py            # Main Reader class
โ””โ”€โ”€ schema.py           # Data models

Development

# Clone and install
git clone https://github.com/Riocloud/riocloud-reader.git
cd riocloud-reader
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black .
ruff check --fix .

License

MIT โ€” Riocloud

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

riocloud_reader-1.0.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

riocloud_reader-1.0.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file riocloud_reader-1.0.0.tar.gz.

File metadata

  • Download URL: riocloud_reader-1.0.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for riocloud_reader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ee2c3b943b5101fbe56340b89e13073bb95b0301cc0e40d12e94aca896374f62
MD5 a1654fffa2cb0e531785386403d270e2
BLAKE2b-256 d9d0bc2a0c830fff8ca8cd7e03864bfe88e983c6a1e394b9961919983620161d

See more details on using hashes here.

File details

Details for the file riocloud_reader-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for riocloud_reader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b6a996d98a6e02d512910f879df1d1672f45f5ad6a41df9afcb900f86c331f1
MD5 3cfdfda0db7bc201fbe21c0ec42d7c32
BLAKE2b-256 fbd623f4be617f95323e13599d595b27e1a37b1c805d68c1b30ba3702305375f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page