From 5280d498e339085e5f3e0ff5a2484f3ddf8a4c77 Mon Sep 17 00:00:00 2001 From: t0is Date: Sun, 9 Mar 2025 15:26:17 +0100 Subject: [PATCH] edits --- Dockerfile | 1 + generate-docker-compose.py | 4 ++-- main.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2416121..c37860a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ RUN curl -L https://github.com/lay295/TwitchDownloader/releases/download/1.55.2/ # Copy application code, the entrypoint script, and channels.json COPY main.py . COPY channels.json . +COPY cookies.txt . # Default command CMD ["python", "-u", "main.py"] \ No newline at end of file diff --git a/generate-docker-compose.py b/generate-docker-compose.py index b7bc976..5e91659 100644 --- a/generate-docker-compose.py +++ b/generate-docker-compose.py @@ -17,8 +17,8 @@ for channel in channels: "environment": [ f"CHANNEL_NAME={channel['name']}", f"CHANNEL_LANGUAGE={channel['language']}", - "TIMEDELTA_DAYS=5", - "TIMEDELTA_DAYS_EXACT=false", + "TIMEDELTA_DAYS=6", + "TIMEDELTA_DAYS_EXACT=true", "CLIP_CREATE_FROM_CHAT=false", "TWITCH_CLIENT_ID=a0fuj6tm5ct79clvim9816orphqkov", "TWITCH_CLIENT_SECRET=h7whj3yspxgj1909sgcafx6iz1p1es" diff --git a/main.py b/main.py index 9d31995..059d5cf 100644 --- a/main.py +++ b/main.py @@ -127,7 +127,7 @@ def download_vod(vod_url, output_filename): if os.path.exists(output_filename): print(f"{output_filename} already exists. Skipping download.") return - command = ["yt-dlp", "-o", output_filename, vod_url] + command = ["yt-dlp", "--cookies", "cookies.txt", "-o", output_filename, vod_url] subprocess.run(command, check=True) print(f"Downloaded VOD to {output_filename}")