No project description provided
Project description
极验验证模块的python语言绑定
赞助
赞助名单(排名不分先后)
感谢大家的支持,大家的支持是项目前进的动力!
- 228****503 麟昀
- 497****27 techzjc
- 240****48 吖
- 117****307 asdfff
- 6****710 铛铛.
- 254****276 Yinser
- 27****2875 (˵¯͒〰¯͒˵)
- 206****574 苦楚なのだ
- 377****313 幻梦
- 321****97 存在的语
- 304****419 ......✔
- 852****25 梓逸
- 177****559 酒宝Official
- 74****517 Hikari
- 21****3297 糕手花见sama
- 80****265 渡月桥ovo
- 224****530 江川三三
- 252****652 月がきれい
- 307****743 。
- 506****61 andy
- 282****542 しろ
- 193****886 枕月如风
- 2571****11 诗涤
- 987****49 zhishi
- 170****995 听雨
- 231****383 那白真云
- 196****406 沐浴晨煦
- 2968****09 Star
- 20***6519 铥
- 233****227 故园
- 543****69 我
- 92****033 古明地觉
- 137****726 Kizuna_AI
- 100****684 五条新菜
- 112****460 亚里士多缺德
- 99****135 Anli
- 223****994 比企谷雪乃
- 343****231 天凡
- 112****551 Jason_杰森森
- 119****179 左 佑
- 136****474 ?狼
- 107****818 分贝咩
- 247****056 南楚冥灵
- 144****247 yuanzi.
- 181****302 吾妻槿夜
- 269****949
- 25****883
使用方式
- pip install bili_ticket_gt_python
- import bili_ticket_gt_python
- slide = bili_ticket_gt_python.SlidePy()
- click = bili_ticket_gt_python.ClickPy()
- 通过slide和click调用相关函数
绑定的函数见py.rs文件
demo
执行测试
import bili_ticket_gt_python
slide = bili_ticket_gt_python.SlidePy()
click = bili_ticket_gt_python.ClickPy()
try:
#改为注册滑块challenge和gt的url
validate = slide.test("http://127.0.0.1:5000/pc-geetest/register")
print(validate)
except Exception as e:
print("识别失败")
print(e)
try:
#改为注册点选challenge和gt的url
validate = click.test("https://passport.bilibili.com/x/passport-login/captcha?source=main_web")
print(validate)
except Exception as e:
print("识别失败")
print(e)
通过gt和challenge调用 仅支持点选验证码
import bili_ticket_gt_python
click = bili_ticket_gt_python.ClickPy()
try:
(gt, challenge) = click.register_test("https://passport.bilibili.com/x/passport-login/captcha?source=main_web")
validate = click.simple_match(gt, challenge)
print(validate)
except Exception as e:
print("识别失败")
print(e)
通过gt和challenge调用(自动重试) 仅支持点选验证码
import bili_ticket_gt_python
click = bili_ticket_gt_python.ClickPy()
try:
(gt, challenge) = click.register_test("https://passport.bilibili.com/x/passport-login/captcha?source=main_web")
validate = click.simple_match_retry(gt, challenge)
print(validate)
except Exception as e:
#验证码失效有两种可能性
# 1. 验证码生成过后过了太久,时间导致的失效
# 2. 验证码重试次数过多,需要unset,unset接口请自己扒下来封装吧,我真的懒得封装了
print("自动重试仍然有极小概率报错(超时时间即为验证码失效时间)")
print(e)
#不要100%依赖于demo!!!动动脑子
分步调用
import bili_ticket_gt_python
slide = bili_ticket_gt_python.SlidePy()
try:
(gt, challenge) = slide.register_test("http://127.0.0.1:5000/pc-geetest/register")
(_, _) = slide.get_c_s(gt, challenge)
_type = slide.get_type(gt, challenge)
if _type != "slide":
raise Exception("验证码类型错误")
(c, s, args) = slide.get_new_c_s_args(gt, challenge)
#注意滑块验证码这里要刷新challenge
challenge = args[0]
key = slide.calculate_key(args)
#rt固定即可
#此处使用内嵌js二进制运行时生成w, 你也可以自己接入生成w的逻辑函数
w = slide.generate_w(key, gt, challenge, str(c), s, "abcdefghijklmnop")
(msg, validate) = slide.verify(gt, challenge, w)
print(validate)
except Exception as e:
print("识别失败")
print(e)
import bili_ticket_gt_python
import time
click = bili_ticket_gt_python.ClickPy()
try:
(gt, challenge) = click.register_test("https://passport.bilibili.com/x/passport-login/captcha?source=main_web")
(_, _) = click.get_c_s(gt, challenge)
_type = click.get_type(gt, challenge)
if _type != "click":
raise Exception("验证码类型错误")
(c, s, args) = click.get_new_c_s_args(gt, challenge)
before_calculate_key = time.time()
key = click.calculate_key(args)
#rt固定即可
#此处使用内嵌js二进制运行时生成w, 你也可以自己接入生成w的逻辑函数
w = click.generate_w(key, gt, challenge, str(c), s, "abcdefghijklmnop")
#点选验证码生成w后需要等待2秒提交
w_use_time = time.time() - before_calculate_key
print("w生成时间:", w_use_time)
if w_use_time < 2:
time.sleep(2 - w_use_time)
(msg, validate) = click.verify(gt, challenge, w)
print(validate)
except Exception as e:
print("识别失败")
print(e)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bili_ticket_gt_python-0.2.8.tar.gz.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8.tar.gz
- Upload date:
- Size: 266.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e091d48be1d5490328a9fad77beac922cd624380dab2ebcf1238c374b902eb8d
|
|
| MD5 |
5a63d302c32cc9c18376b7856b1d350a
|
|
| BLAKE2b-256 |
92b42fa2a2a1d023d93f72b34e04116e023982ceaf29d9bea70915c7a18d87dd
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 85.2 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c791b8dd11ebc08c2a42b501a94a3419d5476f66d1e2e956002401477148841
|
|
| MD5 |
b41c5a8f199af095f89463d86637aa6d
|
|
| BLAKE2b-256 |
97d9efc267efe9abbccd1ae4f602fd338097a0a000f1cfd3971e9275e47cd96d
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp313-cp313-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp313-cp313-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 94.0 MB
- Tags: CPython 3.13, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3469700b889786915083cff7ac235b08b996a43ec746d44bcc75b6cf8f9c5b43
|
|
| MD5 |
dfe0dd1a9f559a5913e0d19646c65fae
|
|
| BLAKE2b-256 |
6c936ccaa662e20603b1903bd589969f70b553e856c753b9cbdf4731737cc02b
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 87.3 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4fa1f5d9c009288ed365d86485ec23a7794ddd5be924e2774030c6445322080
|
|
| MD5 |
91b05a9080760a2c5b589f06d9d0843b
|
|
| BLAKE2b-256 |
c33630d2be95223865546809b03f7acc18520413cf591d2fce1ee8d89f620cb3
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp313-cp313-macosx_10_12_x86_64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp313-cp313-macosx_10_12_x86_64.whl
- Upload date:
- Size: 88.4 MB
- Tags: CPython 3.13, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63dde3ffa4bdfcceaf4b82083fffa658295f83cfa0e472244c85168dee1e6629
|
|
| MD5 |
2989f7d274faeb50e0a6b12a437a953f
|
|
| BLAKE2b-256 |
becf0d061ea506411b45ffd541b8a647c487a59699c0f11ebd20c3bdd5fde2d9
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 85.2 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d406ebf840d125f99430cbd684c7e41d537d76dc5d71956ace02d0503914d8
|
|
| MD5 |
f6fe0c9fae5c3fd2017b9544de7cca03
|
|
| BLAKE2b-256 |
c4e79a4ce33e59ecec146be417c84aa488cbb2e4d988b143611c66b7d0603dc1
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp312-cp312-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp312-cp312-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 94.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf47e1506058cf26e160cb778dbeeddb028e55429b0ad75b83611e098228c08a
|
|
| MD5 |
958670902fafecc4bd8dcb5c34a9b8e5
|
|
| BLAKE2b-256 |
d56f9e0ebecf9a6378afecfdec5c6a7da9f877a891c62e925201659dd27942b1
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 87.3 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5516c9a11fba3783a61ef73a5884bf393016cf9fd2998de6369d3202360f000a
|
|
| MD5 |
8b9980285086e2e4a35c0ce5744858a3
|
|
| BLAKE2b-256 |
27a9f1679f3b78f1295de78e8f58cb92033454585e544facbebe03bd03be8a4d
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 88.4 MB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6f973a6983ab2bfdd42773a3f117bef564a3901a7ed182ba1293e78372ac0ea
|
|
| MD5 |
111330d03fc9b3e16e3321c015824962
|
|
| BLAKE2b-256 |
7c098b3bb94cf5aa1da4828a4de67f9d9d59dd35ec8f68f788a7ce0f00830380
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 85.2 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9364be4f026f58cca387bde4b071464da3c1f07421c109ddea58777ab03d9b8d
|
|
| MD5 |
f43d4688e51b639c2b61824781b5ae33
|
|
| BLAKE2b-256 |
154817dc3a2f7a3336f845bd83d1287eddf0afbae048c2043028fca5e774a442
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 87.3 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fd3e3614d117fbdfb987c10e76807d0036b804b6ab5de287998aedf6395859c
|
|
| MD5 |
b6fe6e61131543edf45f87acec9937ee
|
|
| BLAKE2b-256 |
5335fe63a8d6755f3b3151a8c6c5ba6d59bdf4ad742e513e6a26f241b0dc76bc
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 88.4 MB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8296cd4fccbea9236fd6ca8ad61a96d1e19ba7c71d6711872285bde0982a36ab
|
|
| MD5 |
d628d6cde2550834a1d44ffff394c0ca
|
|
| BLAKE2b-256 |
0d3d5a9616f82039bccfd564daee2e82b823ac29df89e9c84dc4db6d0a4206e0
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 85.2 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653e10d8d71a224782312976c0f7f0bb463f79307e97931071722b18f0ab39b4
|
|
| MD5 |
e795ee03ba15f7034ce0e88944a4e3a0
|
|
| BLAKE2b-256 |
e8c22b6fbfa549fc3590dd663bf524596f2bee8a3e0baa711b5699ff99f65013
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 85.2 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9711787ea126d310d0e895e031680b982752e8e6c5bc7f7980cb39739efbdb63
|
|
| MD5 |
d740345f7fbc4de67069bb20d4445ea4
|
|
| BLAKE2b-256 |
3166b0685fb3d09eeb594801d044dd8960134d62954051da746070d04040a9ab
|
File details
Details for the file bili_ticket_gt_python-0.2.8-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: bili_ticket_gt_python-0.2.8-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 85.2 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1a1ed84e57a606e3b97fd8e438f843c10ba2940ca2e0247f95fd1b612f5a802
|
|
| MD5 |
3323bfd045cdf8a58c73d2f92c02414d
|
|
| BLAKE2b-256 |
10e2701e214738d6a2fa4fdd942e20257dd62cf320c6806c759ef1c77b651bab
|