Skip to content

Instantly share code, notes, and snippets.

@Allwin12 Allwin12/captcha.py

Created Jul 26, 2020
Embed
What would you like to do?
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
You can’t perform that action at this time.