2021-06-15 21:27:04 +00:00
|
|
|
#!/usr/bin/env python3
|
2021-06-05 22:34:59 +00:00
|
|
|
import youtube_dl
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
2021-06-12 10:58:25 +00:00
|
|
|
songs_folder = "/songs"
|
|
|
|
jingles_folder = "/jingles"
|
2021-06-05 22:34:59 +00:00
|
|
|
|
2021-06-12 10:46:44 +00:00
|
|
|
# Radio Bullshit
|
|
|
|
## parameters for Radio Bullshit playlist
|
|
|
|
ydl_parameters = {
|
|
|
|
"format": "bestaudio/best",
|
|
|
|
"postprocessors": [{"key": "FFmpegExtractAudio", "preferredcodec": "vorbis"}],
|
2021-06-15 21:27:04 +00:00
|
|
|
"outtmpl": f"{songs_folder}/%(title)s.godwin",
|
2021-06-12 10:46:44 +00:00
|
|
|
"ignoreerrors": True,
|
|
|
|
"restrictfilenames": True,
|
|
|
|
}
|
|
|
|
## download
|
|
|
|
ydl = youtube_dl.YoutubeDL(ydl_parameters)
|
|
|
|
ydl.extract_info(
|
2021-06-05 22:34:59 +00:00
|
|
|
"https://www.youtube.com/playlist?list=PLQC73oq6JtgyYNOeifrJXXzZ1-F0Kgmbg",
|
|
|
|
)
|
2021-06-12 10:46:44 +00:00
|
|
|
|
|
|
|
# Radio Bullshit Jingles
|
|
|
|
## change output path for Radio Bullshit jingles
|
2021-06-15 22:37:25 +00:00
|
|
|
ydl_parameters["outtmpl"] = f"{jingles_folder}/%(title)s.godwin"
|
2021-06-12 10:46:44 +00:00
|
|
|
## download
|
|
|
|
ydl = youtube_dl.YoutubeDL(ydl_parameters)
|
|
|
|
ydl.extract_info(
|
|
|
|
"https://www.youtube.com/playlist?list=PLQC73oq6JtgzX8zbHtP5qXKiH6cuanFWi"
|
|
|
|
)
|