linkedin_scraper icon indicating copy to clipboard operation
linkedin_scraper copied to clipboard

Unable to locate element on person scrape

Open gbuchdahl opened this issue 3 years ago • 6 comments

When running person = Person(url, driver=driver), script throws the following error for each person:

Message: no such element: Unable to locate element: {"method":"css selector","selector":".pv-top-card"}
  (Session info: chrome=89.0.4389.90)

I can try to debug, but first wanted to be sure that this isn't something obvious that I'm missing.

gbuchdahl avatar Apr 02 '21 00:04 gbuchdahl

its bc linked in change the html

alikhambati avatar Apr 06 '21 01:04 alikhambati

I have the same problem, but like this: Message: Unable to locate element: .top-card-layout__title, now that you answered, how can I make it work? Note: This happened after I changed the driver to Firrefox, because with Chrome, it was exactly the same message.

AbelNC5 avatar Apr 08 '21 02:04 AbelNC5

Fix that worked for me in https://github.com/joeyism/linkedin_scraper/pull/93

DirectRoot avatar Apr 10 '21 17:04 DirectRoot

Try it with 2.7.6, or the solution by @DirectRoot . Essentially, this happens because the page isn't fully loaded yet

joeyism avatar Apr 10 '21 20:04 joeyism

I'm seeing a similar error but for li:

NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"li"}
  (Session info: chrome=92.0.4515.131)

using linkedin_scraper version 2.9.0 with python version 3.9.6

boompig avatar Aug 24 '21 14:08 boompig

I'm seeing a similar error but for li:

NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"li"}
  (Session info: chrome=92.0.4515.131)

using linkedin_scraper version 2.9.0 with python version 3.9.6

I fix this problem in https://github.com/joeyism/linkedin_scraper/pull/116

depocoder avatar Sep 01 '21 12:09 depocoder