Sorry for being a bit vague in the title, I don't know the right terminology.
I would like to select the text that follows the highlighted '<source srcset' tag in the below screenshot:
It doesn't work if I try to select the class css-1nfcn93
, and I don't know how to select on anything deeper into the tree. I assume I want xpath, but I don't understand how that works yet.
Some code that does not work ('WebElement has no len()'):
d = webdriver.Chrome()
d.get('https://www.theguardian.com/football/2020/dec/19/burnley-wolves-match-preview-premier-league')
text = d.find_element_by_css_selector('div.css-1nfcn93')
print(len(text))
d.quit()