linkedin_scraper icon indicating copy to clipboard operation
linkedin_scraper copied to clipboard

newest selenium ==4.3.0 breaks the example?

Open HeinrichHaller opened this issue 2 years ago • 3 comments

I think the * in the requirements for selenium breaks the example. It gets 4.3.0 installed that apparently does not have the attribute 'find element by id' anymore. Like described here: https://stackoverflow.com/questions/72754651/attributeerror-webdriver-object-has-no-attribute-find-element-by-xpath

selenium version after fresh install:

selenium.version '4.3.0'

error in the example:

actions.login(driver, email, password) # if ema Traceback (most recent call last): File "", line 1, in File "/home/moritz/.cache/pypoetry/virtualenvs/linkedin-TonP7aHi-py3.9/lib/python3.9/site-packages/linkedin_scraper/actions.py", line 26, in login email_elem = driver.find_element_by_id("username") AttributeError: 'WebDriver' object has no attribute 'find_element_by_id'

Has somebody a workaround? Thanks!

HeinrichHaller avatar Jul 24 '22 15:07 HeinrichHaller

Yes, it breaks the examples. update requirements.txt file with this: selenium==4.2.0 requests lxml

matardy avatar Jul 27 '22 17:07 matardy

Thank you @matardy You're a life saver

JBLarson avatar Aug 04 '22 23:08 JBLarson

Is there a reason requirements.txt doesn't already have version types? Seems like that's an easy way to future proof this library. Happy to raise that PR if you think it's a good idea.

Sunishchal avatar Apr 29 '23 20:04 Sunishchal