Skip to content

Instantly share code, notes, and snippets.

View tecnic8000's full-sized avatar
🤒
Out sick

humanHarri tecnic8000

🤒
Out sick
  • Tecnic8000
  • 19:35 (UTC +07:00)
View GitHub Profile
@twelvedogs
twelvedogs / dl.py
Last active February 6, 2025 20:06
def do_download(url, addedBy):
isPlaylist = url.find('&list=')
if(isPlaylist > -1):
url = url[0:isPlaylist]
# TODO: need to catch malformed url
# TODO: check if folder exists probably
ydl = youtube_dl.YoutubeDL({'outtmpl': os.path.join(cfg.download_path, '%(title)s - %(id)s.%(ext)s'),
'format': 'bestvideo+bestaudio/best',
'getfilename': True,