Official SDK and Boilerplate for WatchBuddy Content Providers Build decentralized scrapers, test them in isolation, and integrate seamlessly with the WatchBuddy ecosystem. π
πΉπ· TΓΌrkΓ§e β’ π«π· FranΓ§ais β’ π·πΊ Π ΡΡΡΠΊΠΈΠΉ β’ πΊπ¦ Π£ΠΊΡΠ°ΡΠ½ΡΡΠΊΠ°
This blueprint provides a standardized environment for developing WatchBuddy Providers. A Provider is a standalone service that supplies content to WatchBuddy (Web/Mobile) through a decentralized network.
- π Plug & Play: Add your provider URL to WatchBuddy and start watching.
- π§ͺ Isolated Development: Local-first architecture allows you to test your plugins without affecting the core system.
- π¬ Unified Media Core: Powered by KekikStream for advanced link extraction.
- π‘οΈ CORS Friendly: Works with standard CORS/proxy setups when needed.
Prerequisites: Python 3.11+. No external media players required for development.
# 1. Clone the repository
git clone https://github.com/keyiflerolsun/ExampleProvider.git
cd ExampleProvider
# 2. Install dependencies
pip install -r requirements.txt
# 3. Setup environment
cp .env.example .env
# 4. Start the engine
python run.pyπ Access Provider: http://127.0.0.1:3310
π WatchBuddy Integration (Localhost): Add http://localhost:3310 to WatchBuddy
- Open WatchBuddy.
- Go to Providers.
- Paste your base URL (e.g.
http://127.0.0.1:3310). - Save and enable the provider.
Requirements:
- Your provider must expose
GET /api/v1/schema. - The response must include
provider_nameanddescription(plus optional proxy URLs).
WatchBuddy is available on Android and iOS.
For more ways to discover titles and quickly send them into a room, you can also use one of these services:
- π Stream Web: https://stream.watchbuddy.tv
- π€ Telegram Bot: https://t.me/WatchBuddyRobot
.
βββ Stream/
β βββ Plugins/ # π Your Website Scrapers (e.g., RareFilmm.py)
β βββ Extractors/ # π Your Link Resolvers (e.g., OneFichier.py)
βββ FastAPI/ # β‘ Provider API Core
βββ run.py # π Main entry point
βββ validate.py # π§ͺ Plugin testing & validation tool
βββ .env # βοΈ Configuration
| Component | Responsibility | Folder |
|---|---|---|
| Plugin | Browsing the site, fetching metadata and embed URLs. | Stream/Plugins/ |
| Extractor | Resolving final playable links from hosting providers. | Stream/Extractors/ |
Creating a new plugin is as simple as adding a Python file to Stream/Plugins/. Here is a minimal boilerplate:
from KekikStream.Core import HTMLHelper, PluginBase, MainPageResult, SearchResult, MovieInfo, Episode, SeriesInfo, Subtitle, ExtractResult
class MyPlugin(PluginBase):
name = "MyPlugin"
language = "en"
main_url = "https://example.com"
favicon = f"https://www.google.com/s2/favicons?domain={main_url}&sz=64"
description = "MyPlugin description"
# Categories List on Main Page
main_page = {
f"{main_url}/category/" : "Category Name"
}
async def get_main_page(self, page: int, url: str, category: str) -> list[MainPageResult]:
# Scrape and return list of MainPageResult
return results
async def search(self, query: str) -> list[SearchResult]:
# Return list of SearchResult
return results
async def load_item(self, url: str) -> MovieInfo | SeriesInfo:
# Return MovieInfo or SeriesInfo
return details
async def load_links(self, url: str) -> list[ExtractResult]:
# self.collect_results(results, data) β collect extract results (handles list/single/None)
# self.deduplicate(results) β URL-based deduplication
# await self.async_cf_get(url) β Cloudflare bypass (async)
# Engine auto-calls sync_subtitles(results) after load_links
return linksUse the built-in validator to ensure your plugins are compliant with the WatchBuddy models. It tests Discovery, Search, Metadata, and Stream extraction automatically.
# Test all local plugins
python validate.py
# Test specific plugins
python validate.py RareFilmmThis SDK uses a Local-First loader. When running from this directory:
- Local Plugins (
Stream/Plugins/) are loaded exclusively. - Local Extractors (
Stream/Extractors/) can be used to override or extend core extractors. - This ensures your development environment is 100% reproducible and isolated.
Looking for inspiration? Explore the core KekikStream library for professional examples:
- π Core Plugins
- π Core Extractors
Your plugins MUST return these standard models to be compatible with WatchBuddy:
MainPageResult: For home screen galleries.SearchResult: For search results.MovieInfo/SeriesInfo: For metadata and episodes.ExtractResult: For playable links (includes referer and user-agent).
graph TB
subgraph WatchBuddyApp[π± WatchBuddy Client]
UI[User Interface]
Player[Video Player]
end
subgraph Provider[π¬ Your Provider]
FastAPI[β‘ FastAPI Entry]
Loader[π Loader Core]
subgraph LocalCode[Local Development]
P1[πΊ RareFilmm Plugin]
E1[π Custom Extractor]
end
end
subgraph External[π Web]
Target[Media Website]
CDN[Raw Stream CDN]
end
UI -->|Search/Load| FastAPI
FastAPI --> Loader
Loader --> P1
P1 -->|Scrape| Target
P1 -->|Request Link| E1
E1 -->|Resolve| CDN
CDN -->|Stream| Player
style Provider fill:#2b2a29,stroke:#ef7f1a,stroke-width:2px
style WatchBuddyApp fill:#242322,stroke:#0087a3,stroke-width:2px
Copyright (C) 2026 by keyiflerolsun β€οΈοΈ Licensed under GNU GENERAL PUBLIC LICENSE Version 3.
This project is developed by @keyiflerolsun for @KekikAkademi.
β If you find this SDK useful, don't forget to give it a star!