Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #8 from zam101/portingSelenium
Browse files Browse the repository at this point in the history
Porting to latest selenium
  • Loading branch information
DedInc authored Feb 2, 2023
2 parents 792a58f + 6adf218 commit 46c0134
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions byerecaptcha/byerecaptcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ def hover(element):

def clickReloadButton():
driver.switch_to.frame(imageFrame)
driver.find_element_by_id('recaptcha-reload-button').click()
driver.find_element(By.ID, 'recaptcha-reload-button').click()
driver.switch_to.parent_frame()

def clickVerify():
driver.switch_to.frame(imageFrame)
driver.find_element_by_id('recaptcha-verify-button').click()
driver.find_element(By.ID, 'recaptcha-verify-button').click()
driver.switch_to.parent_frame()

def getFrames(invisible=False):
Expand Down Expand Up @@ -252,7 +252,7 @@ def choose(imagePath):

def clickImage(list_id):
driver.switch_to.frame(imageFrame)
elements = driver.find_elements_by_css_selector('.rc-imageselect-tile')
elements = driver.find_elements(By.CSS_SELECTOR, '.rc-imageselect-tile')
for i in list_id:
elements[i].click()
driver.switch_to.parent_frame()
Expand Down Expand Up @@ -380,4 +380,4 @@ def solveRecaptcha(browser, server='', invisible=False):
result = solveImage()
rmtree(picturesDir)
if result:
return result
return result
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
'Operating System :: OS Independent',
],
packages=find_packages(),
install_requires = ['opencv-python==4.6.0.66', 'Pillow', 'numpy', 'requests', 'selenium==3.141.0'],
install_requires = ['opencv-python==4.6.0.66', 'Pillow', 'numpy', 'requests', 'selenium>=4.7.0'],
python_requires='>=3.6',
)

0 comments on commit 46c0134

Please sign in to comment.