captcha를 png로 저장하는 데 문제가 있습니다. 다음은 이미지 다운로드가 필요하고 새 파일로 로컬에 저장할 지금까지파이썬 저장 url에서 captcha 이미지? 오류 401
import requests
url_login = "https://www.hackthis.co.uk/?login"
r_login = requests.post(url_login, {'username': 'darkcyber', 'password': 'secr3tp4s5'})
print r_login.status_code
if "Invalid login details" in r_login.text:
print "Failed to login"
else:
print "Login success"
url_captcha = "https://www.hackthis.co.uk/levels/extras/captcha1.php"
r_captcha = requests.get(url_captcha)
#print r_captcha.status_code << 401 instead 200
#whats next?
당신은 두 번째 요청 (GET)에 쿠키를 전송해야합니다. 첫 번째 로그인은 세션 쿠키를 반환하기 때문입니다. –