From 2c5b7765a0f34f7c2232d1d5989f58cc55663fd1 Mon Sep 17 00:00:00 2001 From: Aethor Date: Sat, 24 Feb 2024 15:49:56 +0100 Subject: [PATCH] (hopefully) update from youtube_dl to yt_dlp --- ultrasync.sh | 4 ++-- yt_sync.py | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ultrasync.sh b/ultrasync.sh index 279ffaa..c76557a 100644 --- a/ultrasync.sh +++ b/ultrasync.sh @@ -1,7 +1,7 @@ #!/bin/bash while true; do - pip3 install -U youtube_dl + pip3 install -U yt-dlp runuser -l zambla -c '/opt/yt_sync.py' || true - sleep 12h + sleep 6h done diff --git a/yt_sync.py b/yt_sync.py index 8ca0dc9..4bfd0fb 100644 --- a/yt_sync.py +++ b/yt_sync.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 -import youtube_dl +import yt_dlp if __name__ == "__main__": - songs_folder = "/songs" jingles_folder = "/jingles" @@ -17,7 +16,7 @@ if __name__ == "__main__": "restrictfilenames": True, } ## download - ydl = youtube_dl.YoutubeDL(ydl_parameters) + ydl = yt_dlp.YoutubeDL(ydl_parameters) ydl.extract_info( "https://www.youtube.com/playlist?list=PLQC73oq6JtgyYNOeifrJXXzZ1-F0Kgmbg", ) @@ -26,7 +25,7 @@ if __name__ == "__main__": ## change output path for Radio Bullshit jingles ydl_parameters["outtmpl"] = f"{jingles_folder}/%(title)s.godwin" ## download - ydl = youtube_dl.YoutubeDL(ydl_parameters) + ydl = yt_dlp.YoutubeDL(ydl_parameters) ydl.extract_info( "https://www.youtube.com/playlist?list=PLQC73oq6JtgzX8zbHtP5qXKiH6cuanFWi" )