Answers for "show response instead of response 200 python"

0

check if response is 200 python

if resp.status_code == 200:
    print ('OK!')
else:
    print ('Boo!')
Posted by: Guest on January-17-2021
0

response 200 python

import requests
import time
#base64 image encoding
with open("funcaptcha1.png", "rb") as f:
    data = f.read()
    filekodovany = data.encode("base64")
    #captcha uploader
udajepost = {'apikey':'APIKEY','action':'usercaptchaupload','file-upload-01':filekodovany,'source':'pythonator','rotate':'1','angle':'40','base64':'1'}
headers = {'Content-Type':'multipart/form-data'}
r = requests.post('https://www.9kw.eu/index.cgi', data = udajepost)
print(r)
Posted by: Guest on April-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language