将xpath元素转为html原文

from lxml import etree
response = self.driver.page_source
html = etree.HTML(response)
response = etree.tostring(html, encoding="utf-8").decode("utf-8")
posted @ 2023-05-23 10:18  乔儿  阅读(88)  评论(0编辑  收藏  举报