Skip to main content

Geetest CAPTCHA v4 bypass library

Project description

wulu-geetest-bypass

Python License Geetest v4 13 risk types

极验行为验证 v4 自动化通过库。自动处理 ai / slide / match / winlinze / svg_seed 五种风险类型,支持自定义重试、代理和 HTTP 客户端。

安装

推荐使用 uv(更快、更现代的 Python 包管理器):

uv add "wulu-geetest-bypass[all]"

也可用 pip

pip install "wulu-geetest-bypass[all]"

可选依赖:

# slide 滑块(需要 opencv)
uv add "wulu-geetest-bypass[slide]"

# svg-seed 图片选择 + slide
uv add "wulu-geetest-bypass[svg-seed]"

# 全部安装
uv add "wulu-geetest-bypass[all]"

快速开始

import asyncio
from wulu_geetest_bypass import Geetest

async def main():
    g = Geetest(captcha_id='your_captcha_id', risk_type='slide')
    result = await g.resolve()
    print(result)
    # {
    #     "captcha_id": "xxx",
    #     "lot_number": "xxx",
    #     "pass_token": "xxx",
    #     "gen_time": "xxx",
    #     "captcha_output": "xxx"
    # }

asyncio.run(main())

每次验证会自动重试最多 3 次(可通过 retry 参数调整),失败时抛出 VerifyError

风险类型

类型 说明 依赖 支持
ai 无感验证
slide 滑块拼图 [slide]
match 3×3 连线 & 9宫格
winlinze 五子棋
svg_seed SVG 图片选择 [svg-seed]
icon 图标点选
word 文字点选
nine 九宫格
phrase 短语识别
space 空间推理
pencil 涂鸦
voice 语音验证
svg_icon SVG 图标

API

Geetest(**options)

参数 类型 说明
captcha_id str 验证 ID(必填)
risk_type RiskType 风险类型,默认 'ai'
client_type ClientType 客户端类型,'web' / 'web_mobile' / 'android' / 'ios'
lang Lang 语言,'zh' / 'en' / 'zho' / 'eng'
proxy str 代理 URL
client wreq.Client 自定义 HTTP 客户端

方法

load() -> dict

获取验证初始化数据,返回值包含 captcha_typelot_numberpayloadprocess_tokenpow_detail 等字段,可直接传入 verify()

verify(data) -> VerifyResponse

提交验证并返回完整响应:

class VerifyResponse:
    status: str                          # "success" / "fail" / "error"
    data: VerifyData                     # 验证结果数据

class VerifyData:
    lot_number: str
    result: str                          # "success" / "fail"
    fail_count: int
    seccode: Seccode
    score: str
    payload: str
    process_token: str
    payload_protocol: int

resolve(retry=3) -> Seccode

一键完成 load() + verify(),验证失败时自动重试,返回 Seccode

class Seccode:
    captcha_id: str
    lot_number: str
    pass_token: str
    gen_time: str
    captcha_output: str
参数 类型 说明
retry int 失败重试次数,默认 3

异常

异常 说明
GeetestError 所有自定义异常的基类
VerifyError 验证失败(所有重试均未通过)

免责声明

本项目仅供学习和研究使用。使用者应遵守相关法律法规及平台服务条款, 禁止用于任何非法用途。作者不对因使用本项目产生的任何法律问题承担责任。

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

wulu_geetest_bypass-0.1.3.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wulu_geetest_bypass-0.1.3-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file wulu_geetest_bypass-0.1.3.tar.gz.

File metadata

  • Download URL: wulu_geetest_bypass-0.1.3.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wulu_geetest_bypass-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b0aefb92f4d7a6bf6a80da061c726fec2fd1bb1606258f5fb60052be4edc1986
MD5 174b6dd379a5fc85e77c0bbc2dae9f6e
BLAKE2b-256 01ed8bd8b9fda1bd157721182ece6d17d2caf9920a79c5a8de8e2af43e372a86

See more details on using hashes here.

File details

Details for the file wulu_geetest_bypass-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: wulu_geetest_bypass-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wulu_geetest_bypass-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 12d0fdb3c49e092c0590843b7864e131737f5e3e9c58003305a2f699643a3545
MD5 daa20a2c8602a472ec7c17ffba91b4a4
BLAKE2b-256 376aa11ef8af3dfac0c98c30b17b81dd4c33a6bae98d39a3faf9ef89d40c7e5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page