Skip to content

Instantly share code, notes, and snippets.

@Rndwiga
Created September 27, 2019 11:40
Show Gist options
  • Save Rndwiga/e000171d39655f62d2c9846c1d86a734 to your computer and use it in GitHub Desktop.
Save Rndwiga/e000171d39655f62d2c9846c1d86a734 to your computer and use it in GitHub Desktop.
I am one of those lazy people around. I had a couple of tracks from youtube that i wanted to download automatically. So, this is what i came up with...NOTE:: it rides on the youtube-dl utility
import os
musicList =[
"https://www.youtube.com/watch?v=KI5DdxYeIWk",
"https://www.youtube.com/watch?v=Id5XOZf6txg",
"https://www.youtube.com/watch?v=bOwuUbBE-Rw",
"https://www.youtube.com/watch?v=l_x2d23b_M8",
"https://www.youtube.com/watch?v=EdvdDPQEp5k",
"https://www.youtube.com/watch?v=FYpjjgRiaq0",
"https://www.youtube.com/watch?v=r14_4fPliTk",
"https://www.youtube.com/watch?v=v7GJPvidzRI",
"https://www.youtube.com/watch?v=ilnOAwKuZLQ",
"https://www.youtube.com/watch?v=3J25Zikpazw",
"https://www.youtube.com/watch?v=p3zyqOzwsKU",
"https://www.youtube.com/watch?v=jAK35Imapr0",
"https://www.youtube.com/watch?v=Btku2O1VRzI",
"https://www.youtube.com/watch?v=LaGXEI7VY6I",
"https://www.youtube.com/watch?v=lb6DzUiZ_0Y",
"https://www.youtube.com/watch?v=CcN6Ju3MSec",
"https://www.youtube.com/watch?v=F5EZcH9Myps",
"https://www.youtube.com/watch?v=ChyTP4kWzkU",
"https://www.youtube.com/watch?v=jq6z9qMI6HY",
"https://www.youtube.com/watch?v=TahOaasthWY",
"https://www.youtube.com/watch?v=Ffl82FZvtiU",
"https://www.youtube.com/watch?v=TFJ23bU1Hdw",
"https://www.youtube.com/watch?v=OQdvYIz7Mro",
"https://www.youtube.com/watch?v=T-5qZh178sk",
"https://www.youtube.com/watch?v=FD7De0M5kpI",
"https://www.youtube.com/watch?v=g234qmpboV0",
"https://www.youtube.com/watch?v=s_rPkGtDVx0",
"https://www.youtube.com/watch?v=WD6LnMWZvIk",
"https://www.youtube.com/watch?v=AWl4js9sWmQ",
"https://www.youtube.com/watch?v=1iuNPVqJ2r8",
"https://www.youtube.com/watch?v=O7UFoGLcVNw",
"https://www.youtube.com/watch?v=YvJotWdnZI8",
"https://www.youtube.com/watch?v=s4lpONvDZAs",
"https://www.youtube.com/watch?v=tKRRcYNVU2Y",
"https://www.youtube.com/watch?v=GsIu3RdMJbA",
"https://www.youtube.com/watch?v=ZPwS9BzFLsc",
"https://www.youtube.com/watch?v=Ksg396K1XN4",
"https://www.youtube.com/watch?v=1phzPujFUTM",
"https://www.youtube.com/watch?v=Xg1bvxlX8iA",
"https://www.youtube.com/watch?v=NbVrjH4dvEc",
"https://www.youtube.com/watch?v=Zzr7DmgRsPo",
"https://www.youtube.com/watch?v=osvde7xNQ0s"]
for track in musicList:
ydl = "youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 -i {}". format(track)
os.system(ydl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment