joeyism / linkedin_scraper

A library that scrapes Linkedin for user data
GNU General Public License v3.0
2.01k stars 560 forks source link

Unable to locate element on person scrape #91

Open gbuchdahl opened 3 years ago

gbuchdahl commented 3 years ago

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.

alikhambati commented 3 years ago

its bc linked in change the html

AbelNC5 commented 3 years ago

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.

DirectRoot commented 3 years ago

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

joeyism commented 3 years ago

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

boompig commented 3 years ago

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

depocoder commented 3 years ago

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