A cracker of geetest depends on selenium
Project description
geecracker
极验验证 (geetest) Selenium 破解方式,参考了以下几篇文章:
Install
pip install geecracker
Usage
from geecracker import validate, panel_visible, GeeConfig
# 省略 selenium 登录到面板出现的代码,具体流程可以参考 tests/main.py
# GeeConfig 可以使用默认参数,如果需要修改配置以使更适合自己的项目的话,再考虑进行修改
gee_config = GeeConfig()
# 判断极验验证面板是否可见
if panel_visible(driver):
# 开始验证
validate(driver, gee_config)
Advanced
from geecracker import GeeCracker, panel_visible, GeeConfig
class CustomGeeCracker(GeeCracker):
def __init__(self, *args, **kwargs):
super(CustomGeeCracker, self).__init__(*args, **kwargs)
def _validate(self) -> bool:
# rewrite validation process
return super(CustomGeeCracker, self)._validate()
def custom_validation(self) -> bool:
# this will be automatically added to _validation_passed
# it's not recommended to modify _validation_passed to ensure GeeCracker works correctly
return True
... # other methods could be rewrite too
... # your codes
CustomGeeCracker(self.driver, self.gee_config).validate()
Contribute
if you want to contribute to this project, follow the steps below
# in you virtual env, run
pip install -r requirements.txt
# test your code
# currently I don't have enought time to add another test case,
# if you're intereseted in this project, it'll be grateful that you create your own test case with enthusiasm
# use your own ehire account, modify tests/data/account.test.json and tests/data/search_data.test.json
python -m tests.ehire.main
feel free to submit a pull request 😆
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
geecracker-0.0.2.tar.gz
(6.6 kB
view hashes)
Built Distribution
Close
Hashes for geecracker-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b90cb135ce314a2793446456c62b52f6a90542d8e8b1525248e81649c4a85d0 |
|
MD5 | 104b54963d41fca9384b2dac4a5c8d6e |
|
BLAKE2b-256 | 29cc7f5414d23c4affa6f8248ab688261531ba4b861a93b54c9a81432ab9aeff |