Created
July 26, 2020 14:11
-
-
Save Allwin12/84d097bafb3d63c8fda0c75aa37f62b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from captcha.image import ImageCaptcha | |
import string | |
import random | |
text = ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in range(10)) | |
image = ImageCaptcha() | |
data = image.generate(text) | |
image.write(text, 'captcha.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment