Skip to content

Instantly share code, notes, and snippets.

@pknowledge
Created September 2, 2020 19:27
Show Gist options
  • Save pknowledge/1d4f8e3ef535c1ade0d06bafb13fdd9c to your computer and use it in GitHub Desktop.
Save pknowledge/1d4f8e3ef535c1ade0d06bafb13fdd9c to your computer and use it in GitHub Desktop.
How to Create Image & Audio CAPTCHA in Python
#Image Captcha:
from captcha.image import ImageCaptcha
image = ImageCaptcha
data = image.generate(‘9876543’)
image.write (‘9876543’,’sam.png’)
#Audio Captcha:
from captcha.audio import AudioCaptcha
audiofile = AudioCaptcha
data = audiofile.generate(‘543’)
audiofile.write (‘543’,’hello.png’)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment