الجمعة، 20 ديسمبر 2013

Get the inner HTML of a element in lxml

I am trying to get the HTML content of child node with lxml and xpath in Python. As shown in code below, I want to find the html content of the each of product nodes. Does it have any methods like product.html?

productGrids = tree.xpath("//div[@class='name']/parent::*")for product in productGrids: print #html content of product

View the original article here

ليست هناك تعليقات:

إرسال تعليق