Skip to content

Commit

Permalink
feat(app): update version
Browse files Browse the repository at this point in the history
  • Loading branch information
MorvanZhou committed Dec 25, 2024
1 parent d240a91 commit 7d6f058
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/retk/core/account/app_captcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
from random import choices
from typing import Tuple, Dict, OrderedDict

from captcha.audio import AudioCaptcha
from captcha.image import ImageCaptcha
try:
from captcha.audio import AudioCaptcha
from captcha.image import ImageCaptcha
except ImportError:
img_captcha = None
audio_captcha = None
else:
img_captcha = ImageCaptcha(font_sizes=(35, 30, 32))
audio_captcha = AudioCaptcha()

from retk import const
from retk.core.utils import cached_verification

DEFAULT_CAPTCHA_EXPIRE_SECOND = 60

img_captcha = ImageCaptcha(font_sizes=(35, 30, 32))
audio_captcha = AudioCaptcha()

alphabet = "347ACEFGJLMNPRTY"
alphabet_len = len(alphabet)
code_idx_range = list(range(0, alphabet_len - 1))
Expand Down

0 comments on commit 7d6f058

Please sign in to comment.