How to make and Image Captcha in python in under 10 lines

Опубликовано: 06 Август 2026
на канале: Stupid Chess
16
1

Subscribe and press the like button.
If you want me to make another say in the comments
Here is the code:
from random import *
from captcha.image import ImageCaptcha
image = ImageCaptcha(width = 700, height = 200)
cap = []
for i in range(10):
n = randint(0,9)
cap.append(str(n))
data = image.generate(cap)
image.write(cap,"captcha.png")