No project description provided
Project description
kabigon
A URL content loader library that extracts content from various sources (YouTube, Instagram Reels, Twitter/X, Reddit, PDFs, web pages) and converts them to text/markdown format.
Installation
pip install kabigon
playwright install chromium
Usage
CLI
kabigon <url>
# Examples
kabigon https://www.youtube.com/watch?v=dQw4w9WgXcQ
kabigon https://x.com/elonmusk/status/123456789
kabigon https://reddit.com/r/python/comments/xyz/...
kabigon https://example.com/document.pdf
Python API - Sync
import kabigon
url = "https://www.google.com.tw"
# Simple usage
content = kabigon.PlaywrightLoader().load_sync(url)
print(content)
# With multiple loaders (tries each in order)
loader = kabigon.Compose([
kabigon.TwitterLoader(),
kabigon.YoutubeLoader(),
kabigon.RedditLoader(),
kabigon.PDFLoader(),
kabigon.PlaywrightLoader(), # Fallback for generic URLs
])
content = loader.load_sync(url)
print(content)
Python API - Async
import asyncio
import kabigon
async def main():
url = "https://www.google.com.tw"
# Single URL
loader = kabigon.PlaywrightLoader()
content = await loader.load(url)
print(content)
# Batch processing multiple URLs in parallel
urls = [
"https://x.com/user1/status/123",
"https://youtube.com/watch?v=abc",
"https://reddit.com/r/python/comments/xyz",
]
loader = kabigon.Compose([
kabigon.TwitterLoader(),
kabigon.YoutubeLoader(),
kabigon.RedditLoader(),
kabigon.PlaywrightLoader(),
])
# Parallel processing
results = await asyncio.gather(*[loader.load(url) for url in urls])
for url, content in zip(urls, results):
print(f"{url}: {len(content)} chars")
asyncio.run(main())
Supported Sources
| Source | Loader | Description |
|---|---|---|
| YouTube | YoutubeLoader |
Extracts video transcripts |
| Twitter/X | TwitterLoader |
Extracts tweet content |
RedditLoader |
Extracts Reddit posts and comments | |
| Instagram Reels | ReelLoader |
Audio transcription + metadata |
PDFLoader |
Extracts text from PDF files (URL or local) | |
| PTT | PttLoader |
Taiwan PTT forum posts |
| Generic Web | PlaywrightLoader |
Browser-based scraping for any website |
| Generic Web | HttpxLoader |
Simple HTTP requests with markdown conversion |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
kabigon-0.11.0-py3-none-any.whl
(12.4 kB
view details)
File details
Details for the file kabigon-0.11.0-py3-none-any.whl.
File metadata
- Download URL: kabigon-0.11.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7da1df28a29ebeea89be6d379f75e2e49e4086ddb5060f72d50c73621555981a
|
|
| MD5 |
cd02a05ca8283202b18a73842c4c2066
|
|
| BLAKE2b-256 |
c59d0a14675d736203308ed92665eee9780d559069f808c18a0399bedcb28f81
|