fix(youtube): correct extractor-args separator, soften worker recycling, retry video upload
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 1m53s
All checks were successful
CI/CD Pipeline / build-and-deploy (push) Successful in 1m53s
EXTRACTOR_ARGS used ':' instead of ';' between player_client and skip fields, so yt-dlp parsed "android:skip=translated_subs" and "hls" as bogus player_client values and silently fell back to the web client only, which fails the n-challenge and returns no formats. --max-requests=1 fully restarted the gunicorn worker after every single request, opening a race window that could drop the response connection right after a successful download; raised to 20 with jitter to keep the periodic-recycle safety net without doing it on every request. reply_video() to Telegram had no retry, so a transient httpx transport error during upload discarded an already-downloaded video; added the same 3-attempt retry pattern already used for the downloader services.
This commit is contained in:
parent
ab703e4bd6
commit
67dba21ff9
3 changed files with 29 additions and 18 deletions
|
|
@ -6,4 +6,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||
COPY . .
|
||||
RUN mkdir -p downloads
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
CMD sh -c "gunicorn --workers=1 --timeout=600 --preload --max-requests=1 --bind=0.0.0.0:\${PORT:-5000} app:app"
|
||||
CMD sh -c "gunicorn --workers=1 --timeout=600 --preload --max-requests=20 --max-requests-jitter=5 --bind=0.0.0.0:\${PORT:-5000} app:app"
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ YTDLP_CMD = 'yt-dlp'
|
|||
DOWNLOAD_TIMEOUT = 300
|
||||
INFO_TIMEOUT = 60
|
||||
|
||||
PLAYER_CLIENTS = 'web,android'
|
||||
EXTRACTOR_ARGS = 'youtube:player_client=web,android:skip=translated_subs,hls'
|
||||
EXTRACTOR_ARGS = 'youtube:player_client=web,android;skip=translated_subs,hls'
|
||||
|
||||
|
||||
def _build_ytdlp_base_cmd() -> list:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue