I am scraping a website that has a bit of html in this format.
</p></div><div class="content "><ul class="office-list"><li><a href="javascript:void(0)" class="_office atlanta" data-slug="atlanta" data-title="Atlanta" data-address="Twilio Atlanta<br />950 East Paces Ferry Road NE, 18th Floor<br />Atlanta, GA 30326<br />"
I have tried using some python code which is:
items = driver.find_elements_by_xpath("//*[contains(@class, 'address')]")
for item in items:
addresses.append(item.text)
However in this case, its not the class which contains 'address', it is data-address. How can I search any element attribute which contains 'address'?