(hopefully) update from youtube_dl to yt_dlp
Some checks failed
continuous-integration/drone/push Build is failing

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 #!/bin/bash
while true; do while true; do
pip3 install -U youtube_dl pip3 install -U yt-dlp
runuser -l zambla -c '/opt/yt_sync.py' || true runuser -l zambla -c '/opt/yt_sync.py' || true
sleep 12h sleep 6h
done done

View File

@ -1,9 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import youtube_dl import yt_dlp
if __name__ == "__main__": if __name__ == "__main__":
songs_folder = "/songs" songs_folder = "/songs"
jingles_folder = "/jingles" jingles_folder = "/jingles"
@ -17,7 +16,7 @@ if __name__ == "__main__":
"restrictfilenames": True, "restrictfilenames": True,
} }
## download ## download
ydl = youtube_dl.YoutubeDL(ydl_parameters) ydl = yt_dlp.YoutubeDL(ydl_parameters)
ydl.extract_info( ydl.extract_info(
"https://www.youtube.com/playlist?list=PLQC73oq6JtgyYNOeifrJXXzZ1-F0Kgmbg", "https://www.youtube.com/playlist?list=PLQC73oq6JtgyYNOeifrJXXzZ1-F0Kgmbg",
) )
@ -26,7 +25,7 @@ if __name__ == "__main__":
## change output path for Radio Bullshit jingles ## change output path for Radio Bullshit jingles
ydl_parameters["outtmpl"] = f"{jingles_folder}/%(title)s.godwin" ydl_parameters["outtmpl"] = f"{jingles_folder}/%(title)s.godwin"
## download ## download
ydl = youtube_dl.YoutubeDL(ydl_parameters) ydl = yt_dlp.YoutubeDL(ydl_parameters)
ydl.extract_info( ydl.extract_info(
"https://www.youtube.com/playlist?list=PLQC73oq6JtgzX8zbHtP5qXKiH6cuanFWi" "https://www.youtube.com/playlist?list=PLQC73oq6JtgzX8zbHtP5qXKiH6cuanFWi"
) )