lxml提取html標籤內容, tostring()不能顯示中文 解決方案

from lxml import etree import requests response = requests.get('https://www.baidu.com/).text tree = etree.HTML(response) strs = tree.xpath( "//body") strs = strs[0] strs = (etree.tostring(strs)) # 不
相關文章
相關標籤/搜索