Created
September 2, 2020 19:27
-
-
Save pknowledge/1d4f8e3ef535c1ade0d06bafb13fdd9c to your computer and use it in GitHub Desktop.
How to Create Image & Audio CAPTCHA in Python
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
#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