Added Radio Bullshit Jingles to yt_sync.py

This commit is contained in:
Aethor 2021-06-12 12:46:44 +02:00
parent 5737277256
commit e4f0fba223

View File

@ -1,3 +1,4 @@
#!/usr/bin/python3
import os
import youtube_dl
@ -6,17 +7,26 @@ if __name__ == "__main__":
script_dir = os.path.dirname(os.path.abspath(__file__))
ydl = youtube_dl.YoutubeDL(
{
"format": "bestaudio/best",
"postprocessors": [
{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}
],
"outtmpl": f"{script_dir}/songs/%(title)s.ogg",
"ignoreerrors": True,
"restrictfilenames": True,
}
)
playlist_infos = ydl.extract_info(
# Radio Bullshit
## parameters for Radio Bullshit playlist
ydl_parameters = {
"format": "bestaudio/best",
"postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}],
"outtmpl": f"{script_dir}/songs/%(title)s.ogg",
"ignoreerrors": True,
"restrictfilenames": True,
}
## download
ydl = youtube_dl.YoutubeDL(ydl_parameters)
ydl.extract_info(
"https://www.youtube.com/playlist?list=PLQC73oq6JtgyYNOeifrJXXzZ1-F0Kgmbg",
)
# Radio Bullshit Jingles
## change output path for Radio Bullshit jingles
ydl_parameters["outtmpl"] = f"{script_dir}/jingles/%(title)s.ogg"
## download
ydl = youtube_dl.YoutubeDL(ydl_parameters)
ydl.extract_info(
"https://www.youtube.com/playlist?list=PLQC73oq6JtgzX8zbHtP5qXKiH6cuanFWi"
)