安装:
>>> pip3 install pyquery
引用方法:
from pyquery import PyQuery as pq
CSS选择器:
from pyquery import PyQuery as pq html = ''' first item second item third item fourth item fifth item ''' doc=pq(html) print(doc("#container .list li"))
输出结果:
上一篇:利用python编写一个抽奖小程序
下一篇:pdb模块怎么在python中使用