title: using subprocess for the youtube-dl for automatic song list downloading
body: <p>From the following code, I want to query each line which contains a song name (a line from a file "playlist.txt") from the google search engine, then based on the results I am taking the youtube link and using the youtube-dl, I am extracting the audio.</p>
  
  <p>When i run the link which the results hold,GOOGLE blocks that claiming a unusual traffic from my computer system.Any method to counter that</p>
  
  <p>I have used sleep to keep a time lapse between the requests.</p>
  
  <p>I want to know how to rectify that error</p>
  
  <p>I think changing the user agents or using proxies might be useful to avoid automated search detection.So, I wanted to know how to change my code to achieve that</p>
  
  <pre><code>import urllib
  import json as m_json
  import re
  import time
  import subprocess
  from random import randint
  import getpass
  playlist=open('playlist.txt','r')
  songs = playlist.readlines()
  song_num = 1
  for song in songs:
     query = song
     query = urllib.urlencode ( { 'q' : query } )
     response = urllib.urlopen ( 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;' + query ).read()
     json = m_json.loads ( response )
     results = json [ 'responseData' ] [ 'results' ]
     for result in results:
         title = result['title']
         url = result['url']
         if re.search(r'www.youtube.com',url):
             print ( title + '; ' + url )
             print "DOWNLOADING",title
             decoded_url=urllib.unquote(url).decode('utf8')
             print decoded_url
             subprocess.call(['youtube-dl','-o','/home/'+getpass.getuser()+'/Videos/playlist%('+title+").(ext)s","--extract-audio","--audio-format","mp3",decoded_url])
             break;
     print song_num
     time.sleep(randint(10,15))
     song_num+=1
  </code></pre>
  
  <p>output</p>
  
  <pre><code>DOWNLOADING &lt;b&gt;Black Sabbath Iron Man&lt;/b&gt; - YouTube
  http://www.youtube.com/watch?v=rT4KpfiFcNc
  [youtube] rT4KpfiFcNc: Downloading webpage
  [youtube] rT4KpfiFcNc: Extracting video information
  [youtube] rT4KpfiFcNc: Downloading DASH manifest
  ERROR: Error in output template: unsupported format character '(' (0x28) at index 73 (encoding: 'UTF-8')
  </code></pre>