tree etree HTML html for block in tree xpath div class product img blo

1
2
3
4
5
tree = etree.HTML(html)
for block in tree.xpath("//div[@class='product']"):
img = block.xpath("//img/@src")[0]
name = block.xpath("//tr[@class='name']")[0].text
id = block.xpath("//tr[@class='id']")[0].text