title: Download MP3 files with Python using SearchMP3.mobi service
body: <p>In my free time I have wrote this script in Python language.</p>
  
  <pre><code>import urllib2
  
  class SearchMP3:
  
      def download(self):
  
          url = self.url_base + self.title + self.mid_url + self.artist
  
          mp3file = urllib2.urlopen(self.url_base + self.title + self.mid_url + self.artist + self.end_url)
          output = open(self.title + '.mp3','wb')
          mp3file.addheaders = [('User-agent', 'Mozilla/5.0')]
          mp3file.addheaders = [('Host', 's14.searchmp3.mobi')]
          mp3file.addheaders = [('Referer', url)]
          output.write(mp3file.read())
          output.close()
  
      def url(self):
          self.url_base = 'http://searchmp3.mobi/'
          self.mid_url = '-mp3'
          self.end_url = '?download=1'
          SearchMP3.download()
  
      def data(self):
          print 'Welcome to SearchMP3Mobi download service.'
          self.artist = raw_input()
          self.artist.replace('','-')
          self.title = raw_input()
          self.title.replace('','-')
          SearchMP3.url()
  
  if __name__ == '__main__':
      SearchMP3 = SearchMP3()
      SearchMP3.data()
  </code></pre>
  
  <p>The script doesn't report any error, but the file size after download is in the KB order. Why? Here I use urlopen, can I use request mode for download mp3 from this site?</p>
  
  <p>Thanks!</p>