Closed Vigle-N0ir closed 2 years ago
The modification must be done here between these lines
delay()
create = driver.find_element(By.XPATH, '//*[@id="__next"]/div[1]/main/div/div/section/div[2]/form/div/div[1]/span/button')
driver.execute_script("arguments[0].click();", create)
time.sleep(sleeptime)
main_page = driver.current_window_handle
if check_exists_by_xpath(driver, '//h4[text()="Almost done"]'):
wait_xpath('//h4[text()="Almost done"]')
captcha_element = driver.find_element(By.XPATH,'//h4[text()="Almost done"]')
if check_exists_by_tagname('iframe'):
# print("have iframe")
delay()
solved_info = WebDriverWait(driver, 150).until(ExpectedConditions.presence_of_element_located((By.XPATH, "//*[@class='captcha-solver-info']" )))
# solved_status = WebDriverWait(driver, 10).until(ExpectedConditions.presence_of_element_located((By.XPATH, "//*[@class='captcha-solver-info']" ))).get_attribute("innerHTML")
# print(str(solved_status))
wait_xpath("//div[@class='captcha-solver']")
captcha_solver_button = driver.find_element(By.XPATH, "//div[@class='captcha-solver']")
driver.execute_script("arguments[0].click();", captcha_solver_button)
time.sleep(sleeptime)
WebDriverWait(driver, 60).until(ExpectedConditions.presence_of_element_located((By.XPATH, "//*[@data-state='solving']" )))
print("solving")
WebDriverWait(driver, 300).until(ExpectedConditions.presence_of_element_located((By.XPATH, "//*[@data-state='solved']")))
print("solved")
else:
pass
else:
print("no captcha")
try:
delay()
cross = WebDriverWait(driver, 360).until(ExpectedConditions.presence_of_element_located((By.XPATH, '/html/body/div[6]/div/div/div/div[2]/button/i')))
cross.click()
time.sleep(sleeptime)
except:
delay()
cross = WebDriverWait(driver, 360).until(ExpectedConditions.presence_of_element_located((By.XPATH, '/html/body/div[5]/div/div/div/div[2]/button/i')))
driver.execute_script("arguments[0].click();", cross)
time.sleep(2)
Thank u
where to put this
This is for 2 captcha right? I want for buster
how can we alter the code? this is the solution I am seeking for
Hi Mr Genius.
There are three modifications to make for this program to work perfectly because you are a genius man.
Modification 1: Modified the code so that it detects if the captcha has not been solved, it just refreshes the captcha and clicks on the buster again until the captcha resolves (if still an error, it refreshes until 'to obtain the positive response) and thus continue the process.
Modification 2: Put an option or if the captcha is resolved instantly without going through the pictures (because by installing the client buster on our computer we have 95% that the captcha is resolved instantly (I tested it)) make the process continue and pass the buster step where it has to click and refresh (Modification 1) and continue the process.
Modifications 3 π : Make Modification 1 and 2 have a link with a predefined order.
Example:
Sorry i used the translation π
Congratulations to you
(I know it's easy to say but hard to do πͺ)