How do I find all the tags which have a background image ?
No stylesheets used. All styling is inline in the tags.
I’m using lxml and xpath, currently. This is how far I could get:
from lxml import html
html_text = """somehtml"""
doc = html.fromstring(html_text)
tagWithBackgrounds = doc.xpath("//*[contains(@style,'background')]")
What next ?
doc.xpath('//*[contains(@style,"background") and contains(@style,"url(")]')not perfect, but works.