ThoughtfulDev / EagleEye

Stalk your Friends. Find their Instagram, FB and Twitter Profiles using Image Recognition and Reverse Image Search.
Do What The F*ck You Want To Public License
4.25k stars 562 forks source link

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

Open vkulaganathan opened 2 years ago

vkulaganathan commented 2 years ago

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 commented 2 years ago

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.