Beautiful soup is a Python library that is designed primarily for short-term projects such as screen captures. There are three features that make it very powerful:
1.Beautiful Soup provides some simple methods and Python terminology for retrieving and modifying the syntax tree: A toolkit for parsing documents and extracting relevant information. So you don't have to write a lot of code to write an app. The 2.Beautiful soup automatically converts the input document to Unicode encoding and converts the output document to UTF-8 encoding. You don't have to think about coding, unless the input document does not indicate its encoding and beautiful soup cannot automatically detect it, you need to indicate the original encoding method. 3.Beautiful soup is located on top of some popular Python parsers such as lxml and Html5lib, which allows you to use different parsing strategies or sacrifice speed for flexibility. Beautiful Soup analyzes anything you mention, and completes the tree for you. You can tell it to "Find all links" or "Find all links for class Externallink" or "Find links with all URL addresses matching foo.com" or "Find headers with bold, return those bold text." 1. Install PIP First
wget Https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gztar zxvf PIP-1.5.6.TAR.GZCD Pip-1.5.6python setup.py Install
2, Installation BeautifulSoup
Pip Install Beautifulsoup4
Mac installation Beautiful Soup