xpath是一门在HTML/XML中查找信息的语言,Python的lxml库引入了xpath。在Python中引入lxml就可以解析HTML
安装
1 | pip install lxml |
基础应用
1 | from lxml import etree # 导入xpath |
xpath是一门在HTML/XML中查找信息的语言,Python的lxml库引入了xpath。在Python中引入lxml就可以解析HTML
1 | pip install lxml |
1 | from lxml import etree # 导入xpath |