I'm trying to scrape some data from LinkedIn but I noticed that the elements id change each time I load the page with Selenium. So I tried using class name to find all the elements but the class names have newline inside of them, preventing me from scraping the website.
example of class with newlines here
I tried doing the below:
job_test = "ember-view jobs-search-results__list-item occludable-update p0 relative scaffold-layout__list-item\n \n \n "
job_list = driver.find_elements(By.CLASS_NAME, job_test)
I even tried this:
job_test = '''ember-view jobs-search-results__list-item occludable-update p0 relative scaffold-layout__list-item
'''
job_list = driver.find_elements(By.CLASS_NAME, job_test)
But it does not show me any elements when I print job_list. What do I do here?