Add curl-cffi dependency and update README for browser impersonation support. Enhanced configuration options for yt-dlp to include impersonation settings, improving compatibility with anti-bot measures. Updated logging in main.py to reflect new impersonation settings.

This commit is contained in:
Leonid Pershin
2026-06-21 10:58:14 +03:00
parent eae4def0bf
commit ea906bbf0e
6 changed files with 155 additions and 2 deletions
+3
View File
@@ -48,6 +48,9 @@ class Settings:
cookies_from_browser: str | None = os.environ.get("PVDL_COOKIES_FROM_BROWSER") or None
# Файл cookies в формате Netscape (cookies.txt).
cookies_file: Path | None = _env_path_opt("PVDL_COOKIES_FILE")
# Импперсонация браузера (TLS-отпечаток) для yt-dlp — нужна сайтам с анти-ботом
# (иначе CDN рвёт соединение / 410). "chrome" по умолчанию; пусто — выключить.
impersonate: str | None = os.environ.get("PVDL_IMPERSONATE", "chrome") or None
settings = Settings()