《2018年7月6日》【连续268天】
标题:PyQuery;
内容:
https://cuiqingcai.com/2636.html
1.
2.初始化:
1)直接字符串
from pyquery import PyQuery as pq
doc = pq("<html></html>")
2)lxml.etree
from lxml import etree
doc = pq(etree.fromstring("<html></html>"))
3)直接传URL
from pyquery import PyQuery as pq
doc = pq('http://www.baidu.com')
4)传文件
from pyquery import PyQuery as pq
doc = pq(filename='hello.html')
. . 0