484 lines
9.5 KiB
Markdown
484 lines
9.5 KiB
Markdown
# đŹ 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)
|
|
|
|
```bash
|
|
# Cloner et installer
|
|
git clone <repo>
|
|
cd sekai-scraper
|
|
pip install -r requirements.txt
|
|
```
|
|
|
|
### 2. Démarrer le Proxy (30 secondes)
|
|
|
|
```bash
|
|
python video_proxy_server.py
|
|
```
|
|
|
|
### 3. Tester (10 secondes)
|
|
|
|
```bash
|
|
# 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](PROXY_GUIDE.md)** | đ Guide complet du proxy (dĂ©ploiement VPS, API, etc.) |
|
|
| **[GUIDE_FR.md](GUIDE_FR.md)** | đ«đ· Guide gĂ©nĂ©ral en français |
|
|
| **[README_SEKAI.md](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
|
|
|
|
1. Ouvrir VLC
|
|
2. MĂ©dia â Ouvrir un flux rĂ©seau
|
|
3. Coller l'URL proxy
|
|
4. Lire ! đŹ
|
|
|
|
### C. Page HTML
|
|
|
|
```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
|
|
|
|
```bash
|
|
# 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
|
|
|
|
```bash
|
|
# 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
|
|
|
|
```http
|
|
# 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
|
|
|
|
```bash
|
|
# 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
|
|
|
|
```bash
|
|
# 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
|
|
|
|
```bash
|
|
# 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
|
|
|
|
```javascript
|
|
// Add-on Stremio
|
|
{
|
|
streams: [{
|
|
url: 'https://vid.creepso.com/proxy?url=VIDEO_URL',
|
|
title: 'HD'
|
|
}]
|
|
}
|
|
```
|
|
|
|
### 2. Site Web Personnel
|
|
|
|
```html
|
|
<video controls>
|
|
<source src="https://vid.creepso.com/proxy?url=VIDEO_URL">
|
|
</video>
|
|
```
|
|
|
|
### 3. Application Mobile
|
|
|
|
```kotlin
|
|
// Android avec ExoPlayer
|
|
val videoUrl = "https://vid.creepso.com/proxy?url=VIDEO_URL"
|
|
player.setMediaItem(MediaItem.fromUri(videoUrl))
|
|
```
|
|
|
|
### 4. Script de Téléchargement
|
|
|
|
```python
|
|
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
|
|
|
|
1. **Rate Limiting** (recommandé)
|
|
|
|
```python
|
|
# Ajouter flask-limiter
|
|
@app.route('/proxy')
|
|
@limiter.limit("10 per minute")
|
|
def proxy_video():
|
|
# ...
|
|
```
|
|
|
|
2. **Whitelist d'URLs**
|
|
|
|
```python
|
|
ALLOWED_DOMAINS = ['mugiwara.xyz']
|
|
|
|
def is_allowed_url(url):
|
|
return any(domain in url for domain in ALLOWED_DOMAINS)
|
|
```
|
|
|
|
3. **HTTPS uniquement**
|
|
|
|
```nginx
|
|
# 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
|
|
|
|
1. **Bande passante** : Limitée par votre VPS
|
|
2. **Concurrent users** : Configurer gunicorn workers
|
|
3. **Cache** : Pas de cache vidéo (stream direct)
|
|
4. **DDoS** : Ajouter Cloudflare si nécessaire
|
|
|
|
---
|
|
|
|
## đ DĂ©pannage
|
|
|
|
### "Connection refused"
|
|
|
|
```bash
|
|
# Le serveur n'est pas démarré
|
|
python video_proxy_server.py
|
|
```
|
|
|
|
### "403 Forbidden" avec le proxy
|
|
|
|
```bash
|
|
# Vérifier les headers dans video_proxy_server.py
|
|
# Le site a peut-ĂȘtre changĂ© sa protection
|
|
```
|
|
|
|
### Vidéo lag/buffering
|
|
|
|
```bash
|
|
# 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
|
|
|
|
```bash
|
|
# 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*
|
|
|