def getCaptchaImage(self, soup):
i = soup.find("img", { "class" : "form__captcha" })
url= i.get("src")
print soup.find_all("input")
self.last_key = soup.find("input",{"name":"key"})["value"]
self.last_retpath = soup.find("input",{"name":"retpath"})["value"]
fname = "./files/"+next(tempfile._get_candidate_names())+".jpg"
download_image(url, fname)
return fname
评论列表
文章目录