Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #..
- # query 2captcha for the solution
- solution = '' # initialize solution variable with empty string
- while solution == '': # enter querying loop
- await asyncio.sleep(5) # Wait for 5 seconds before querying again
- # make GET request to the 2captcha API endpoint
- response = requests.get(f'http://2captcha.com/res.php?key={api_key}&action=get&id={captcha_id}&json=1')
- # retrieve the solution
- solution = response.json()['request']
- #..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement