Closed danielhangan closed 1 year ago
I'm having a similar issue. Any fixes?
It may be a problem with login. Can you run
from selenium import webdriver
import chromedriver_binary
from linkedin_scraper import Person, actions
driver = webdriver.Chrome()
if __name__ == "__main__":
email = "***"
password = "***"
actions.login(
driver, email, password
) # if email and password isnt given, it'll prompt in terminal
print("Press enter after you've successfully logged in")
person = Person("https://www.linkedin.com/in/danielhangan", driver=driver)
and ensure that you're fully logged in when the chrome driver opens?
@joeyism I can see how the scraper is logging in and going to the person page. But it throws the error while loading the person's page, after it logged in.
Is there a time.sleep between load_page and and find_element_by_class_name?
same problem any solution plz
@joeyism I can see how the scraper is logging in and going to the person page. But it throws the error while loading the person's page, after it logged in.
Is there a time.sleep between load_page and and find_element_by_class_name?
Yea, it should wait until the top card is loaded.
This is probably an issue with selenium - see this stackoverflow thread. Until this is fixed, you can solve it by downgrading selenium.
For references, I have
selenium==3.141.0
and on chrome side
'browserVersion': '107.0.5304.110'
'chromedriverVersion': '107.0.5304.18
You can check your drivers and stuff by running
from selenium import webdriver
driver = webdriver.Chrome()
print(driver.capabilities)
I'm facing the same error here:
Exception has occurred: AttributeError
'WebElement' object has no attribute 'find_element_by_class_name'
File "C:\Users\rogem\Desktop\Project 02\LinkedIn Web Scraper.py", line 8, in
Any solution?
@RogeMetz just downgrade selenium version. It worked for me.
Are there any plans on making this package run with never version of selenium? I think the change in retrieving elements has been there for a while.
I had the same issue and by downgrading Selenium, it works fine.
fixed mine by searching every word in the project having the keyword "find_element_by_class_name" with "find_element". It seems the former is no longer used, probably deprecated
This should be fixed now
My code: