ydl_opts = {'format': 'bestaudio/best', 'postprocessors': [{'key':
    'FFmpegExtractAudio', 'preferredcodec': 'mp3', 'preferredquality':
    '192'}]}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['http://www.youtube.com/watch?v=BaW_jenozKc'])
download only audio from youtube video using youtube-dl in python script