9.5 KiB
9.5 KiB
🎬 Sekai.one Video Proxy - Solution Complète
Accédez aux vidéos de sekai.one depuis n'importe où, sans restriction !
🎯 Le Problème
Le serveur vidéo mugiwara.xyz utilise une protection Referer :
- ✅ Accessible depuis
https://sekai.one/ - ❌ 403 Forbidden en accès direct
Notre Solution : Un serveur proxy qui contourne cette protection !
⚡ Démarrage Ultra-Rapide
1. Installation (1 minute)
# Cloner et installer
git clone <repo>
cd sekai-scraper
pip install -r requirements.txt
2. Démarrer le Proxy (30 secondes)
python video_proxy_server.py
3. Tester (10 secondes)
# Dans un autre terminal
python test_proxy.py
4. Utiliser ! 🎉
URL Proxy :
http://localhost:8080/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4
- Collez dans votre navigateur → La vidéo se lit !
- Utilisez dans VLC → Ça marche !
- Intégrez dans une page web → C'est bon !
📚 Documentation Complète
| Document | Description |
|---|---|
| PROXY_GUIDE.md | 📖 Guide complet du proxy (déploiement VPS, API, etc.) |
| GUIDE_FR.md | 🇫🇷 Guide général en français |
| README_SEKAI.md | 🔧 Documentation technique du scraper |
🚀 Utilisation
A. Dans le Navigateur
http://localhost:8080/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4
B. Avec VLC
- Ouvrir VLC
- Média → Ouvrir un flux réseau
- Coller l'URL proxy
- Lire ! 🎬
C. Page HTML
<video controls>
<source src="http://localhost:8080/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4">
</video>
D. Télécharger
# Avec wget
wget "http://localhost:8080/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4" -O ep527.mp4
# Avec curl
curl "http://localhost:8080/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4" -o ep527.mp4
🌐 Déploiement sur VPS (vid.creepso.com)
Installation Rapide
# Sur votre VPS
git clone <repo>
cd sekai-scraper
pip install -r requirements.txt
# Installer nginx
sudo apt install nginx
# Démarrer avec gunicorn
gunicorn -w 4 -b 127.0.0.1:8080 video_proxy_server:app --daemon
# Configurer nginx (voir PROXY_GUIDE.md)
# Ajouter SSL avec certbot
# Résultat final :
https://vid.creepso.com/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4
Cette URL sera accessible depuis PARTOUT dans le monde ! 🌍
📂 Architecture du Projet
📦 sekai-scraper/
│
├── 🎯 SCRIPTS PRINCIPAUX
│ ├── video_proxy_server.py ⭐ Serveur proxy (UTILISEZ CELUI-CI)
│ ├── test_proxy.py Tests automatiques
│ ├── sekai_one_scraper.py Extrait les URLs vidéo
│ └── get_one_piece.py Script complet (scraping + download)
│
├── 📖 DOCUMENTATION
│ ├── PROXY_GUIDE.md Guide complet du proxy ⭐
│ ├── GUIDE_FR.md Guide français général
│ ├── README_SEKAI.md Doc technique
│ └── QUICKSTART.md Quick start (anglais)
│
├── 🛠️ FRAMEWORK SCRAPING
│ ├── scrapers/ Framework générique
│ ├── utils/ Utilitaires (logs, retry, etc.)
│ └── data_processors/ Validation et stockage
│
└── 📊 DONNÉES
├── data/ Résultats et captures
├── videos/ Vidéos téléchargées
└── logs/ Logs détaillés
🎓 Comment ça Marche ?
Le Flux
1. Client (vous)
↓
http://localhost:8080/proxy?url=VIDEO_URL
↓
2. Serveur Proxy
↓
Ajoute → Referer: https://sekai.one/
↓
3. Serveur Vidéo (mugiwara.xyz)
↓
✅ 200 OK (pense que ça vient de sekai.one)
↓
4. Stream vidéo → Client
Les Headers Magiques
# SANS le proxy → 403 Forbidden ❌
GET /op/saga-7/hd/527.mp4
Host: 17.mugiwara.xyz
# AVEC le proxy → 200 OK ✅
GET /op/saga-7/hd/527.mp4
Host: 17.mugiwara.xyz
Referer: https://sekai.one/ ← La clé !
🛠️ API du Proxy
Endpoints
# 1. Proxy vidéo (streaming)
GET /proxy?url=[VIDEO_URL]
# 2. Infos vidéo (métadonnées)
GET /info?url=[VIDEO_URL]
# 3. Téléchargement forcé
GET /download?url=[VIDEO_URL]
# 4. Health check
GET /health
Exemples
# Obtenir les infos
curl "http://localhost:8080/info?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4"
# Réponse:
{
"accessible": true,
"content_length_mb": 260.14,
"content_type": "video/mp4",
"status_code": 200
}
✨ Fonctionnalités
Serveur Proxy
- ✅ Streaming progressif (pas de téléchargement complet)
- ✅ Range requests (seeking dans la vidéo)
- ✅ CORS activé (utilisable depuis n'importe quel site)
- ✅ Multi-thread (plusieurs clients simultanés)
- ✅ Logs détaillés
- ✅ API REST complète
Scraper
- ✅ Extraction automatique des URLs vidéo
- ✅ Support Selenium (JavaScript)
- ✅ Analyse des patterns
- ✅ Captures d'écran pour debug
- ✅ Sauvegarde des résultats (JSON)
🧪 Tests
# Tester tout automatiquement
python test_proxy.py
# Tests effectués :
✓ Health Check - Serveur actif
✓ Video Info - Métadonnées accessibles
✓ Streaming - Téléchargement fonctionne
✓ Range Request - Seeking supporté
✓ Direct Access - Protection active (403)
# Génère aussi test_video_player.html
🎯 Cas d'Usage
1. Intégration Stremio
// Add-on Stremio
{
streams: [{
url: 'https://vid.creepso.com/proxy?url=VIDEO_URL',
title: 'HD'
}]
}
2. Site Web Personnel
<video controls>
<source src="https://vid.creepso.com/proxy?url=VIDEO_URL">
</video>
3. Application Mobile
// Android avec ExoPlayer
val videoUrl = "https://vid.creepso.com/proxy?url=VIDEO_URL"
player.setMediaItem(MediaItem.fromUri(videoUrl))
4. Script de Téléchargement
import requests
url = "http://localhost:8080/proxy?url=VIDEO_URL"
with requests.get(url, stream=True) as r:
with open("video.mp4", "wb") as f:
for chunk in r.iter_content(8192):
f.write(chunk)
🔒 Sécurité
Sur VPS
- Rate Limiting (recommandé)
# Ajouter flask-limiter
@app.route('/proxy')
@limiter.limit("10 per minute")
def proxy_video():
# ...
- Whitelist d'URLs
ALLOWED_DOMAINS = ['mugiwara.xyz']
def is_allowed_url(url):
return any(domain in url for domain in ALLOWED_DOMAINS)
- HTTPS uniquement
# nginx config
return 301 https://$server_name$request_uri;
📊 Performance
Benchmarks (localhost)
Taille vidéo : 260 MB
Streaming : ~50 MB/s
Latence : <100ms
Range requests : ✅ Supporté
Clients simul. : 10+ (avec gunicorn -w 4)
Sur VPS
Bande passante : Dépend du VPS
Latence : 50-200ms (selon localisation)
CDN compatible : Oui (Cloudflare, etc.)
⚠️ Limitations
- Bande passante : Limitée par votre VPS
- Concurrent users : Configurer gunicorn workers
- Cache : Pas de cache vidéo (stream direct)
- DDoS : Ajouter Cloudflare si nécessaire
🐛 Dépannage
"Connection refused"
# Le serveur n'est pas démarré
python video_proxy_server.py
"403 Forbidden" avec le proxy
# Vérifier les headers dans video_proxy_server.py
# Le site a peut-être changé sa protection
Vidéo lag/buffering
# 1. Vérifier la bande passante
# 2. Augmenter les workers gunicorn
gunicorn -w 8 ...
# 3. Utiliser un CDN
📈 Roadmap
- Cache vidéo (Redis)
- Dashboard de monitoring
- Support playlist M3U8
- Transcoding à la volée
- Interface web pour tester
- API key authentication
- Docker container
- Kubernetes deployment
🤝 Contribution
Ce projet est dans le cadre d'un bug bounty autorisé.
- ✅ Usage pour tests de sécurité
- ✅ Usage personnel
- ❌ Distribution publique interdite
- ❌ Respecter les droits d'auteur
📞 Support
- Logs :
logs/*_scraping.log - Captures :
data/*.png - HTML debug :
data/sekai_page_source.html
🎉 Résultat Final
Après déploiement sur VPS :
🌐 URL Publique (accessible partout) :
https://vid.creepso.com/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4
✅ Fonctionne dans :
- Navigateurs web (Chrome, Firefox, Safari, etc.)
- Lecteurs vidéo (VLC, MPV, etc.)
- Applications mobiles
- Stremio add-ons
- Scripts de téléchargement
- Balises <video> HTML5
🚀 Performance :
- Streaming progressif
- Seeking fonctionnel
- Pas de limite de taille
- Multi-clients
🏁 Quick Start Complet
# 1. Installation
git clone <repo> && cd sekai-scraper
pip install -r requirements.txt
# 2. Démarrer le proxy
python video_proxy_server.py
# 3. Tester
python test_proxy.py
# 4. Utiliser
# Ouvrir dans le navigateur :
http://localhost:8080/proxy?url=https://17.mugiwara.xyz/op/saga-7/hd/527.mp4
# 5. Déployer sur VPS (optionnel)
# Voir PROXY_GUIDE.md section "Déploiement"
# 🎉 C'est tout !
Made with ❤️ for bug bounty and educational purposes
Licence : À usage personnel uniquement - Respectez les droits d'auteur