📜  youtube-dl python 下载到特定文件夹 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:54.464000             🧑  作者: Mango

代码示例1
ydl_opts = {
    'format': 'bestaudio/best',
      'outtmpl': 'e:/python/downloadedsongs/%(title)s.%(ext)s', # <--- pay attention here
    'download_archive': 'downloaded_songs.txt',
    'outtmpl': '%(title)s.%(ext)s',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'mp3',
        'preferredquality': '192',
        }],
    'logger': MyLogger(),
    'progress_hooks': [my_hook],

}