I'm trying to get the lenght of a movie using webscraping but it doesn't work.
I have the following code:
lenght = driver.find_element(By.CSS_SELECTOR,".sc-52284603-0 > li:nth-child(2)").text
but the result is not as expected. I get 12 and not 2h 56min and I don't understand why because I'm using the correct cssselector
CodePudding user response:
You were nearly there. it should have been .sc-52284603-0 > li:nth-child(3)
lenght = driver.find_element(By.CSS_SELECTOR,".sc-52284603-0 > li:nth-child(3)").text