Exemplo n.º 1
0
Arquivo: core.py Projeto: pjq/gmb
 def find_final_uri(self, i=0):
     '''找到最终真实下载地址,以供下一步DownLoad类下载'''
     song = self.songlist[i]
     songurl = song_url_template % (song['id'],)
     html = self.get_url_html(songurl)
     s = SongParser()
     s.feed(html)
     return s.url
Exemplo n.º 2
0
 def find_final_uri(self, id):
     '''找到最终真实下载地址,以供下一步DownLoad类下载'''
     songurl = song_url_template % (id,)
     html = self.get_url_html(songurl)
     captcha = captcha_reg.findall(html)
     if captcha:
         print '杯具,google让你输入验证码了。。。换个IP或者等等再试吧。'
         return None
     else:
         s = SongParser()
         s.feed(html)
         return s.url