取得网页源代码,导入pyquery库
pip3 install pyquery
如果报错的话:python安装pyquery报错error: 'libxml/xmlversion.h' file not found
xcode-select --install
sudo C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2/libxml:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include pip3 install lxml
pip3 install pyquery