2023-01-17 20:04:49 +08:00
|
|
|
from geetestServer import GeetestValidateServer
|
|
|
|
|
from loghelper import log
|
2022-10-08 15:59:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def game_captcha(gt: str, challenge: str):
|
2023-01-17 20:04:49 +08:00
|
|
|
#启动网页服务器,要求用户完成米哈游的验证码
|
|
|
|
|
log.info("遭遇验证码,请在浏览器中打开 http://127.0.0.1:16384 来完成验证码")
|
|
|
|
|
g = GeetestValidateServer()
|
|
|
|
|
return g.solveCaptcha(challenge,gt) # 失败返回None 成功返回validate
|
2022-10-08 15:59:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def bbs_captcha(gt: str, challenge: str):
|
2023-01-17 20:04:49 +08:00
|
|
|
log.info("遭遇验证码,请在浏览器中打开 http://127.0.0.1:16384 来完成验证码")
|
|
|
|
|
g = GeetestValidateServer()
|
|
|
|
|
return g.solveCaptcha(challenge,gt)
|