Beautiful Soup库
Beautiful Soup
Provide some simple python式
functions to handle: navigation, search, modify, tree analysis and other functions
It is a toolkit to provide needed data captured by the user to parse the document, simply because all do not need much code to write a complete application
Beautiful Soup is a library of python, the most important functions are: to get data from the web
beautifulsoup4 == 4.7.1 fourth version, referred tobs4
Learning objectives Beautiful Soup library
A method of acquiring data may be added to
Add a bs4 based on regular expressions, XPath on
Beautiful Soup library installation
pip install beautifulsoup4
Beautiful Soup parser support
Mainly with the first two parsers more, but the main thing is to use the second (lxml HTML解析器)
additional installation if the second parser, you need lxml库
the command:pip install lxml