Advertisement
dereksir

Untitled

Feb 13th, 2024 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. #..
  2.     # query 2captcha for the solution
  3.     solution = '' # initialize solution variable with empty string
  4.     while solution == '': # enter querying loop
  5.         await asyncio.sleep(5)  # Wait for 5 seconds before querying again
  6.         # make GET request to the 2captcha API endpoint
  7.         response = requests.get(f'http://2captcha.com/res.php?key={api_key}&action=get&id={captcha_id}&json=1')
  8.         # retrieve the solution
  9.         solution = response.json()['request']
  10.  
  11. #..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement