(hopefully) update from youtube_dl to yt_dlp
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Aethor 2024-02-24 15:49:56 +01:00
parent 548302a006
commit 2c5b7765a0
2 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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"
)