joeyism/linkedin_scraper

I started a new repo and got the following error

Opened this issue · 10 comments

AttributeError: 'WebDriver' object has no attribute 'find_elements_by_class_name'

should be replaced by:

driver.find_element("name", "q")

according to https://stackoverflow.com/a/72773269/3767229

I quess you downloaded a previous version of the module try using
pip install linkedin-scraper==2.11.0

I get the same error with linkedin-scraper==2.11.0

@ternaus Can you attach a screenshot of which function you are using?

selenium==4.8.3
linkedin-scraper==2.11.0
from linkedin_scraper import Person, actions
from selenium import webdriver
driver = webdriver.Chrome()

email = <EMAIL>
password = <PASSWORD>

actions.login(driver, email, password) # if email and password isnt given, it'll prompt in terminal
person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5", driver=driver)

print(person.name)

=>

Traceback (most recent call last):
  File "/mnt/evo850/workspace/SalesBrain.tech/scripts/get_person.py", line 9, in <module>
    person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5", driver=driver)
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 63, in __init__
    self.scrape(close_on_complete)
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 88, in scrape
    self.scrape_logged_in(close_on_complete=close_on_complete)
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 261, in scrape_logged_in
    self.get_name_and_location()
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 235, in get_name_and_location
    top_panels = self.driver.find_elements_by_class_name("pv-text-details__left-panel")
AttributeError: 'WebDriver' object has no attribute 'find_elements_by_class_name'

selenium==4.8.3
linkedin-scraper==2.11.0
from linkedin_scraper import Person, actions
from selenium import webdriver
driver = webdriver.Chrome()

email = <EMAIL>
password = <PASSWORD>

actions.login(driver, email, password) # if email and password isnt given, it'll prompt in terminal
person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5", driver=driver)

print(person.name)

=>

Traceback (most recent call last):
  File "/mnt/evo850/workspace/SalesBrain.tech/scripts/get_person.py", line 9, in <module>
    person = Person("https://www.linkedin.com/in/andre-iguodala-65b48ab5", driver=driver)
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 63, in __init__
    self.scrape(close_on_complete)
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 88, in scrape
    self.scrape_logged_in(close_on_complete=close_on_complete)
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 261, in scrape_logged_in
    self.get_name_and_location()
  File "/home/vladimir/anaconda3/envs/salesbrain.tech/lib/python3.10/site-packages/linkedin_scraper/person.py", line 235, in get_name_and_location
    top_panels = self.driver.find_elements_by_class_name("pv-text-details__left-panel")
AttributeError: 'WebDriver' object has no attribute 'find_elements_by_class_name'

#158
this PR will solve this issue @ternaus

@lusifer021 Let's merge it? :)

Yes, but I don't have access.

Also have this issue.

How to solve it?