调整魔目录结构

This commit is contained in:
zhengxinonly
2021-06-24 02:42:34 +08:00
parent 0cb74c5eb7
commit 8fba71c464
26 changed files with 294 additions and 289 deletions
-14
View File
@@ -1,14 +0,0 @@
from captcha.image import ImageCaptcha
from PIL import Image
from random import choices
def gen_captcha(content='0123456789'):
""" 生成验证码 """
image = ImageCaptcha()
# 获取字符串
captcha_text = "".join(choices(content, k=4))
# 生成图像
captcha_image = Image.open(image.generate(captcha_text))
return captcha_text, captcha_image