- Introduced `playwright_extract_m3u8.py` to extract M3U8 URLs from YouTube videos using Playwright. - Added `README_PLAYWRIGHT.md` for usage instructions and requirements. - Created `expand_and_test_proxies.py` to expand user-provided proxies and test their validity. - Implemented `generate_proxy_whitelist.py` to generate a whitelist of working proxies based on testing results. - Added sample proxy files: `user_proxies.txt` for user-defined proxies and `proxies_sample.txt` as a template. - Generated `expanded_proxies.txt`, `whitelist.json`, and `whitelist.txt` for storing expanded and valid proxies. - Included error handling and logging for proxy testing results.
44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
services:
|
|
tubescript-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.api
|
|
args:
|
|
# Invalida la capa COPY . /app sin necesidad de --no-cache completo
|
|
CACHEBUST: "${CACHEBUST:-1}"
|
|
image: tubescript-api:latest
|
|
container_name: tubescript_api
|
|
ports:
|
|
- "8282:8000"
|
|
volumes:
|
|
# Datos persistentes: cookies.txt, config, etc.
|
|
- ./data:/app/data:rw
|
|
# ── Perfiles de navegador del HOST (read-only) ──────────────────────────
|
|
# yt-dlp puede leer cookies directamente del navegador con
|
|
# POST /extract_chrome_cookies?browser=chrome
|
|
# Descomenta el navegador que tengas instalado en el host:
|
|
- ${HOME}/.config/google-chrome:/host-chrome:ro
|
|
# - ${HOME}/.config/chromium:/host-chromium:ro
|
|
# - ${HOME}/.config/BraveSoftware/Brave-Browser:/host-brave:ro
|
|
# - ${HOME}/.mozilla/firefox:/host-firefox:ro
|
|
# - ${HOME}/.config/microsoft-edge:/host-edge:ro
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- API_COOKIES_PATH=/app/data/cookies.txt
|
|
# Proxy opcional: socks5h://127.0.0.1:9050
|
|
- API_PROXY=${API_PROXY:-}
|
|
restart: unless-stopped
|
|
networks:
|
|
- tubescript-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
networks:
|
|
tubescript-network:
|
|
name: tubescript-network
|
|
driver: bridge
|