def verify_code(self): timestemp = time.time() imgurl = 'http://api.chaxun.la/api/seccode/?0.{0}'.format(timestemp) if self.download(imgurl): captcha = Captcha() code_result = captcha.verification(filename='captcha.gif') self.verify = code_result.get('Result')