Add a very basic ability to download audio only

This commit is contained in:
Matthew Adams
2021-03-13 18:00:12 +10:00
parent f08b4ac4df
commit 2b0c005f8b
3 changed files with 47 additions and 9 deletions

View File

@@ -2,7 +2,7 @@ import youtube_dl
def download(videoUrl):
response = {'fileName': '', 'duration': 0, 'messages': ''}
ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s.mp4'})
ydl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s.mp4', 'merge_output_format': 'mp4'})
with ydl: