MCPcopy Create free account
hub / github.com/ecthros/uncaptcha2 / waitFor

Function waitFor

run.py:36–45  ·  view source on GitHub ↗

Wait for a coordinate to become a certain color

(coords, color)

Source from the content-addressed store, hash-verified

34 return proc.communicate()[0].split()[0]
35
36def waitFor(coords, color):
37 ''' Wait for a coordinate to become a certain color '''
38 pyautogui.moveTo(coords)
39 numWaitedFor = 0
40 while color != runCommand("eval $(xdotool getmouselocation --shell); xwd -root -silent | convert xwd:- -depth 8 -crop \"1x1+$X+$Y\" txt:- | grep -om1 '#\w\+'"):
41 time.sleep(.1)
42 numWaitedFor += 1
43 if numWaitedFor > 25:
44 return -1
45 return 0
46
47def downloadCaptcha():
48 ''' Navigate to demo site, input user info, and download a captcha. '''

Callers 1

downloadCaptchaFunction · 0.85

Calls 1

runCommandFunction · 0.85

Tested by

no test coverage detected