Trying to get the Finance data from this div. There is no unique identifier for this div. So, I collect all 3-4 divs check if the word FINANSE appears in the text, if it does, then get the inner div text. However, it doesn't seem to work. Any other approach or what am I missing here? Thanks in advance.
link = https://rejestr.io/krs/882875/fortuna-cargo
fin_divs = driver.find_elements_by_css_selector('div.card.mb-4')
for div in fin_divs:
if 'FINANSE' in div.text:
finances = div.find_element_by_css_selector('div.card-body').text
else:
finances = "Finance Data Not Available"