XPath常见用法

import requests
from lxml import etree
url='https://www.baidu.com/'
r=requests.get(url)
r.encoding='utf-8'
r.text

root=etree.HTML(r.text)
root.xpath('/html/*')

猜你喜欢

转载自www.cnblogs.com/tiankong-blue/p/11552078.html
今日推荐