Comments (4)
def solve():
import sys
from twocaptcha import TwoCaptcha
result = None
sitekey = "f5561ba9-8f1e-40ca-9b5b-a0b3f719ef34"
api_key = key2captcha
solver = TwoCaptcha(api_key)
try:
result = solver.hcaptcha(
sitekey=sitekey,
url=driver.current_url
)
except Exception as e:
sys.exit(e)
return result
textarea = driver.find_element(By.NAME, 'h-captcha-response')
solution = solve()
code = solution['code']
driver.execute_script(f"var ele=arguments[0]; ele.innerHTML = '{code}';", textarea)
from 2captcha-python.
but it wont complete the h-Captcha at all
giving me no error
from 2captcha-python.
@kratzky support?
from 2captcha-python.
We don't discuss here any topics not related to the python module itself.
The module's task is to interact with 2Captcha API and return you the answer/token. The rest is you own task.
My first recommendation for such kind of cases:
- make it working in a browser without any automation
- when done, automate it with your favourite webdriver
I'm pretty sure you need to execute a callback on your target website.
You can also contact 2captcha support team and ask for help.
from 2captcha-python.
Related Issues (20)
- Support on AWS Lambda HOT 1
- It's new version (v_1.2.0) not working for linux, may be for windows also but older one works fine. HOT 3
- Geetest3 always returning ERROR_CAPTCHA_UNSOLVABLE HOT 2
- CERTIFICATE_VERIFY_FAILED HOT 6
- [Feat. request] Return result from getting report
- Add new turnstile parameters
- import error follow on document example HOT 2
- Cloudflare Turnstile solver giving ERROR_BAD_PARAMETERS HOT 19
- Add RQData. HOT 2
- ValueError: Failed to send message: 400 {'captcha_key': ['captcha-required']
- Turn off ssl verification
- Case Sensitive does not work HOT 3
- Cloudflare Turnstile ERROR_CAPTCHA_UNSOLVABLE HOT 4
- AttributeError: 'TwoCaptcha' object has no attribute 'hcaptcha' HOT 2
- AttributeError: 'TwoCaptcha' object has no attribute 'normal' HOT 2
- AttributeError: 'TwoCaptcha' object has no attribute 'recaptcha' HOT 2
- Error Report to False HOT 1
- ReCAPTCHAv2 not passing on reportcontent.google.com HOT 2
- ImportError: cannot import name 'TwoCaptcha' from partially initialized module 'twocaptcha' (most likely due to a circular import)
- Any way to get some free credits to use the service? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 2captcha-python.