A FastAPI-based application for searching and downloading videos from multiple French streaming sites.
-
Flemmix (formerly Wiflix) -
flemmix- Base URL: https://flemmix.wiki/
- Default provider
-
PapaduStream -
papadustream- Base URL: https://papadustream.credit/
-
French Stream -
french-stream- Base URL: https://www.french-streaming.tv/
pip install -r requirements.txt
pip install undetected-chromedriverpython api.pyThe API will be available at http://localhost:8000
Once the server is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
GET /providers
Returns the list of available streaming providers.
Response:
{
"providers": ["papadustream", "french-stream", "flemmix"],
"default": "flemmix"
}GET /search?query={search_term}&provider_name={provider}
Search for movies or series.
Parameters:
query(required): Search term (e.g., "Futurama", "The Matrix")provider_name(optional): Provider to use (default: "flemmix")
Example:
curl "http://localhost:8000/search?query=Futurama&provider_name=flemmix"Response:
{
"results": [
{
"title": "Futurama",
"url": "https://flemmix.wiki/serie/futurama",
"image_url": "https://..."
}
]
}POST /get-videos
Extract video links from a media page.
Body:
{
"media_url": "https://flemmix.wiki/serie/futurama",
"provider_name": "flemmix"
}Response:
{
"results": [
{
"title": "Episode 1",
"url": "https://uqload.cx/...",
"duration": "...",
"resolution": "720p",
"size_in_bytes": 123456789
}
]
}POST /download
Start a background download task.
Body:
{
"video_url": "https://uqload.cx/embed-xyz.html"
}python test_flemmix.py "Futurama"python test_papadustream.pyEach provider implements the AbstractProvider interface:
class AbstractProvider:
def search_media(self, text: str) -> list[Media]:
"""Search for media and return results"""
raise NotImplementedError
async def get_uqvideos_from_media_url(self, url: str) -> list[UqVideo]:
"""Extract video links from a media page"""
raise NotImplementedError- Create a new file in
providers/(e.g.,providers/new_site.py) - Implement the
AbstractProviderinterface - Add the provider to
api.py:
from providers.new_site import NewSiteProvider
providers = {
# ... existing providers
"new-site": NewSiteProvider(driver),
}Represents a movie or series search result:
class Media:
title: str # Title of the media
url: str | None # URL to the media page
image_url: str | None # Thumbnail/poster URLRepresents a video with metadata:
class UqVideo:
duration: str
image_url: str
resolution: str
size_in_bytes: int
title: str
type: str
url: str # Direct video URL
html_url: str # UQload page URLThe project follows these patterns:
- Use type hints for all function parameters and returns
- Use XPath for web scraping
- Handle exceptions gracefully
- Use
run_in_threadpoolfor blocking operations - Normalize URLs to absolute paths
- FastAPI: Web framework
- Selenium: Web scraping with JavaScript rendering
- undetected-chromedriver: Bypass bot detection
- UQLoad: Video extraction library
- The Flemmix provider is designed to be robust with multiple fallback XPath patterns
- All providers normalize UQload URLs to ensure uniqueness
- The API uses a single shared Chrome driver instance for efficiency
- Downloads are handled in background tasks
- Video link retrieval is cached to improve performance - see CACHE.md for details
- Search operations are not cached to ensure fresh results
This tool is for educational purposes only. Always respect copyright laws and terms of service of the streaming sites.