Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Reshow the captcha on EOF.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Dec 18, 2023
1 parent 77825a2 commit 014741b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions abdicate
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,14 @@ def main():
with tempfile.NamedTemporaryFile(prefix='aero2.', suffix='.jpeg') as img:
img.write(img_response)
img.flush()
show_image(img.name, options=options)
captcha = input('captcha: ')
while True:
show_image(img.name, options=options)
try:
captcha = input('captcha: ')
except EOFError:
continue
else:
break
captcha = str.join(' ', captcha.split())
if not captcha:
continue
Expand Down

0 comments on commit 014741b

Please sign in to comment.