Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Change ReCAPTCHA finding to use XPath for challenges with different s…
Browse files Browse the repository at this point in the history
…rc attribute.
  • Loading branch information
thicccat688 committed Jun 4, 2023
1 parent 7f6569f commit 76b66e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions selenium_recaptcha_solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ def click_recaptcha_v2(self, iframe: WebElement, by_selector: Optional[str] = No
self._driver.switch_to.parent_frame()

captcha_challenge = self._wait_for_element(
by=By.CSS_SELECTOR,
locator='iframe[src*="www.google.com/recaptcha/api2/bframe"]',
by=By.XPATH,
locator='//iframe[contains(@src, "recaptcha") and contains(@src, "bframe")]',
timeout=5,
)

Expand Down
1 change: 0 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
options.add_argument("--window-size=1920,1080")

options.add_argument(f'--user-agent={test_ua}')
options.add_argument('--incognito')

options.add_argument('--no-sandbox')
options.add_argument("--disable-extensions")
Expand Down

0 comments on commit 76b66e4

Please sign in to comment.