I'm writing code to scrap data from sites like LinkedIn and in the process of doing so, I wasn't able to extract the company name even though I'd followed through on the expected format of using XPATH's inbuilt class nodes.
I tried the following line of code to scrap the company name from each profile:
company=driver.find_element(By.XPATH,'//ul[@class="pv-text-details_right-panel"]').text
It produced no error. How do I fix this?
Use this xpath:
(//ul[@class='pv-text-details__right-panel']//div)[1]