先导入包 from lxml import etree 然后 tree=etree.HTML(detailHtml) detailHtml是网页内容 dataNoteList=tree.xpath(u'//td') td 表示标记名称