Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I trying to solve hCaptcha. Is solved but not submitted, and stop! #89

Open
BaseMax opened this issue Apr 22, 2021 · 1 comment
Open

Comments

@BaseMax
Copy link

BaseMax commented Apr 22, 2021

Hello,

This seems to solve the security code.
But nothing happens after that. How can I solve this?

j3g6guj

# Max Base
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
import time
import json

email = "kwoo**[email protected]"
password = "ky*a***r**9"

def acp_api_send_request(driver, message_type, data={}):
    message = {
        'receiver': 'antiCaptchaPlugin',
        'type': message_type,
        **data
    }
    return driver.execute_script('''
    return window.postMessage({});
    '''.format(json.dumps(message)))

options = webdriver.ChromeOptions()
options.add_extension('anticaptcha-plugin_v0.52.crx')
browser = webdriver.Chrome('chromedriver', options=options)

browser.get('https://antcpt.com/blank.html')
acp_api_send_request(
    browser,
    'setOptions',
    {
        'options': {
            'antiCaptchaApiKey': '****',
            'autoSubmitForm': True,
            'playSounds': True,
            'saveInStorage': True,
        }
    }
)

time.sleep(3)

browser.get('https://www.epicgames.com/id/login/epic')

time.sleep(3)

browser.find_element_by_xpath('//*[@id="email"]').send_keys(email)

time.sleep(3)

browser.find_element_by_xpath('//*[@id="password"]').send_keys(password)

time.sleep(5)

browser.find_element_by_xpath('//*[@id="sign-in"]').click()

time.sleep(10)

WebDriverWait(browser, 120).until(lambda x: x.find_element_by_css_selector('.antigate_solver.solved'))

time.sleep(2)

driver.execute_script('document.querySelector("#challenge-form").submit()')

browser.find_element_by_css_selector('input[type=submit]').click()
# https://python-anticaptcha.readthedocs.io/en/latest/usage.html#solve-recaptcha

time.sleep(4)

browser.find_element_by_xpath('//*[@id="root"]/div/div/div/div/div[2]/div/form').click()

time.sleep(10)

# Test button
e = browser.find_element_by_xpath('//*[@id="login-continue"]/span')
if e:
    e.click()

I know this may not be very relevant;
But please advise me how I can solve this problem.

Thanks in advance.

@LinLL
Copy link

LinLL commented Jun 18, 2022

The cloudflare hcaptcha challange is changed. https://alexandrsokolov-41020.medium.com/%D1%80%D0%B5%D1%88%D0%B0%D0%B5%D0%BC-hcaptcha-9eebf2ee3c5a
I uesd the plugin solved this. But I can't pass the captcha using python-anticaptcha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants