天天看点

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

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

pip install beautifulsoup4

新建一个测试文件

test_soup.py

python test_soup.py

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