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

AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath' #158

Open
vkulaganathan opened this issue Oct 13, 2022 · 1 comment

Comments

@vkulaganathan
Copy link

I get the following error: python3 eagle-eye.py

Traceback (most recent call last):
  File "eagle-eye.py", line 229, in <module>
    main(skipFB=args.skipfb, FBUrls=[], jsonRep=jsonRepFile, dockerMode=aDocker, dockerName=aName)
  File "eagle-eye.py", line 99, in main
    f.grabData()
  File "/EagleEye/EagleEye/grabber/facebook.py", line 25, in grabData
    profile_img_links = driver.find_elements_by_xpath("//a[@class='_2ial']")
AttributeError: 'WebDriver' object has no attribute 'find_elements_by_xpath'
@JamesPiggott
Copy link

I had the same problem, but to be clear I tried to install EagleEye on Ubuntu 22.10 with webdriver-manager==3.8.4.
The functions of this API have changed, it is now find_element() and its plural find_elements() and they both need arguments. In your case it would become:

profile_img_links = driver.find_elements("xpath", "//a[@class='_2ial']")

others include:

image = e.find_element(By.TAG_NAME, "img") link_name = self.driver.find_elements(By.TAG_NAME,'a')

You need to adjust both google.py and facebook.py. After that comes the need to adjust the xpaths.

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