Skip to content

Instantly share code, notes, and snippets.

@tiborsimon
Created July 31, 2017 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiborsimon/402e5729aae6239138bd42b235a78909 to your computer and use it in GitHub Desktop.
Save tiborsimon/402e5729aae6239138bd42b235a78909 to your computer and use it in GitHub Desktop.
import win32clipboard
from subprocess import call
# get clipboard data
win32clipboard.OpenClipboard()
url = win32clipboard.GetClipboardData()
win32clipboard.CloseClipboard()
call(['youtube-dl', '--extract-audio', '--audio-format', 'mp3', '--prefer-ffmpeg', url])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment