BIBISUFA
New member
I have written a scrip that requests a URL, if the response is is 'CAPCHA_NOT_READY' then the script should sleep for 5 seconds and then request the URL again. If the response starts with 'OK' then the scrip should continue.
I am not sure at how I set up this loop. Thanks, Piers.
I am not sure at how I set up this loop. Thanks, Piers.
Code:
r = requests.get(url)
print("Sending Captcha To 2captcha")
print("Captcha ID = "+(r.text))
time.sleep(5)
url2 = "http://2captcha.com/res.php?key="+api+"action=get&id="+(r.text)[3:]
print(url2)
r = requests.get(url2)
print(r.text)
if r.text == "CAPCHA_NOT_READY":
time.sleep(5)
r = requests.get(url2)
print(r.text)