I started a new repo and got the following error
Opened this issue · 10 comments
eleijonmarck commented
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
lusifer021 commented
I quess you downloaded a previous version of the module try using
pip install linkedin-scraper==2.11.0
ternaus commented
I get the same error with linkedin-scraper==2.11.0
lusifer021 commented
@ternaus Can you attach a screenshot of which function you are using?
ternaus commented
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'
lusifer021 commented
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'
ternaus commented
@lusifer021 Let's merge it? :)
lusifer021 commented
Yes, but I don't have access.
mattsunsjf commented
Also have this issue.
javaCR7 commented
How to solve it?
lusifer021 commented
use this PR #158
@javaCR7 @mattsunsjf