python 爬取知乎图片

 

SyntaxError: Non-UTF-8 code starting with '\xbf' in file python-zhihu -v1.2.py on line 34, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

安装需要的模块

pip install requests
pip install PyQuery

pip show 命令检查模块是否安装成功(如图所示是成功的)

C:\Users\addiction\Desktop\zhihu-take>pip show requests
Name: requests
Version: 2.21.0
Summary: Python HTTP for Humans.
Home-page: http://python-requests.org
Author: Kenneth Reitz
Author-email: [email protected]
License: Apache 2.0
Location: c:\users\addiction\appdata\local\programs\python\python37-32\lib\site-packages
Requires: chardet, certifi, urllib3, idna
Required-by:
----------------------------------------------------------

C:\Users\addiction\Desktop\zhihu-take>pip show PyQuery
Name: pyquery
Version: 1.4.0
Summary: A jquery-like library for python
Home-page: https://github.com/gawel/pyquery
Author: Gael Pasgrimaud
Author-email: [email protected]
License: BSD
Location: c:\users\addiction\appdata\local\programs\python\python37-32\lib\site-packages
Requires: cssselect, lxml
Required-by:

猜你喜欢

转载自www.cnblogs.com/jxlsblog/p/10445066.html