avatar_info = content_tree.xpath('//div[@class="avatar"]/a[1]/mip-img')[0]
avatar_label = etree.tostring(avatar_info, encoding='utf-8').decode("utf-8")
avatar_info = content_tree.xpath('//div[@class="avatar"]/a[1]/mip-img')[0]
avatar_label = etree.tostring(avatar_info, encoding='utf-8').decode("utf-8")
本文标题:xpath保留原始内容及标签
本文链接:https://www.haomeiwen.com/subject/tobssltx.html
网友评论