Here is the important 2 lines of code.<p><pre><code>  response = urlopen(&#x27;https:&#x2F;&#x2F;www.youtube.com&#x2F;results?search_query=&#x27; + search)
  command = &#x27;youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 &#x27; + video_link
</code></pre>
Amazing how useful of a tool you can make with such little code. There is really some great libraries available today.