Python网络爬虫 - 1. 准备工作

1. 安装Beautiful Soup

下载地址

http://www.crummy.com/software/BeautifulSoup/bs4/download/4.4/

解压后,进入根目录

控制台下运行:

python setup.py install

运行结果:

Processing dependencies for beautifulsoup4==4.4.0
Finished processing dependencies for beautifulsoup4==4.4.0

扫描二维码关注公众号,回复: 6734623 查看本文章

然后,继续在控制台下运行:

pip install beautifulsoup4

新建一个测试文件

test_soup.py

from bs4 import BeautifulSoup

控制台下运行:

python test_soup.py

如果没有错误发生, 说明安装成功!!

转载于:https://www.cnblogs.com/davidgu/p/4812719.html

猜你喜欢

转载自blog.csdn.net/weixin_34041003/article/details/93803005