Python Automation Cookbook
上QQ阅读APP看书,第一时间看更新

Getting ready

We'll use the excellent Beautiful Soup module to parse the HTML text into a memory object that can be analyzed. We need to use the beautifulsoup4 package to use the latest Python 3 version that is available. Add the package to your requirements.txt and install the dependencies in the virtual environment:

$ echo "beautifulsoup4==4.6.0" >> requirements.txt
$ pip install -r requirements.txt