0

I'm trying to build a selenium bot just as an excercise to interact with python.

I'm trying to list all the job announces on the first page. I found out that each of the announce as the same class enter image description here

disabled ember-view job-card-container__link job-card-list__title But when I try to collect the datas using find_elements_by_class_name, Python returns just an empty list. Do you know why? Could you help me solving this? I don't know what I'm missing

  • when a css class name is separated by spaces it means there is more than one style associated with it. (The DOM will have many... so "disabled", "ember-view" and "ember-view job-card-container__link job-card-list__title") – pcalkins Oct 07 '21 at 17:42
  • better to use an ID rather than a css class name. Classes are used by many components, ID's should be unique.... so target the "data-control-id", or "id" attribute(s). – pcalkins Oct 07 '21 at 18:04
  • And how do I target the data control I'd? – giovanni sergi Oct 07 '21 at 18:27
  • use XPATH of "//a[@id='ember220']" or "//a[@data-control-id='PDV...']" – pcalkins Oct 07 '21 at 18:44

1 Answers1

0

In my experience, the elements in LinkedIn do not load properly if you don't scroll down the page slowly. See my code that I used on LinkedIn Bot.

Faizan AlHassan
  • 389
  • 4
  • 8