Overview Beautiful Soup library

Beautiful Soup库

Beautiful SoupProvide 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

Here Insert Picture Description
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

Released nine original articles · won praise 0 · Views 4248

Guess you like

Origin blog.csdn.net/ytraister/article/details/104829341