概述
环境:python3.9
依赖:execjs,requests,fastapi
某验
3代文字点选、无感校验、滑块
4代无感校验、滑块、文字点选、消消乐验证、五子棋验证
@geetest_router.get('/v3/{gt}/{challenge}', response_class=ORJSONResponse, summary='极验3代校验,支持无感,滑块,文字点选')
def v3_verify(gt: str, challenge: str, referer: str = None, proxy: str = None):
"""
极验3代校验
:param gt:
:param challenge:
:param referer:
:param proxy:
:return:
"""
validate, validation_type = GeetestThree(gt, challenge, referer, proxy).validation()
return {
'success': True,
'validation': validate,
'type': validation_type
}
@geetest_router.get('/v4/{captcha_id}', response_class=ORJSONResponse, summary='极验4代校验,支持无感,滑块,文字点选')
def v4_verify(captcha_id: str):
"""
极验4代校验
:param captcha_id:
:return:
"""
captcha_type, captcha_id, lot_number, captcha_output, gen_time, pass_token = GeetestFour(captcha_id).validation()
return {
'success': True,
'data': {
"captcha_id": captcha_id,
"lot_number": lot_number,
"captcha_output": captcha_output,
"gen_time": gen_time,
"pass_token": pass_token
},
'type': captcha_type
}
@geetest_router.get('/v4/match/{captcha_id}', response_class=ORJSONResponse, summary='极验4代消消乐')
def v4_verify(captcha_id: str):
"""
极验4代校验
:param captcha_id:
:return:
"""
captcha_id, lot_number, captcha_output, gen_time, pass_token = GeetestMatch(captcha_id).validation()
return {
'success': True,
'data': {
"captcha_id": captcha_id,
"lot_number": lot_number,
"captcha_output": captcha_output,
"gen_time": gen_time,
"pass_token": pass_token
}
}
@geetest_router.get('/v4/winlinze/{captcha_id}', response_class=ORJSONResponse, summary='极验4代五子棋验证')
def v4_verify(captcha_id: str):
"""
极验4代校验
:param captcha_id:
:return:
"""
captcha_id, lot_number, captcha_output, gen_time, pass_token = GeetestWinLinze(captcha_id).validation()
return {
'success': True,
'data': {
"captcha_id": captcha_id,
"lot_number": lot_number,
"captcha_output": captcha_output,
"gen_time": gen_time,
"pass_token": pass_token
}
}
V:Code-Bin
最后
以上就是健壮高跟鞋为你收集整理的某验第四代,第三代的全部内容,希望文章能够帮你解决某验第四代,第三代所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复