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. 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." The valuable data that is hard to get on some poorly designed websites and can be obtained using beautiful soup. It would have been a few hours of work, with beautiful soup only a few minutes. Here's how to install beautiful soup:1 under Windows. Download on the http://www.crummy.com/software/BeautifulSoup/website, the latest version is 4.1.3. 2. After the download is complete, it needs to be decompressed, assuming it is placed under D:/python. 3. Run cmd, switch to the D:/PYTHON/BEAUTIFULSOUP4-4.1.3/directory (modified according to your own unzipped directory and download version number), cd/d d:/python// beautifulsoup4-4.1.34. Run command: setup.py buildsetup.py install5. Under IDE from BS4 import BeautifulSoup, there is no error stating that the installation was successful. ====================================================mac Install 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
Install beautiful Soup under Windows and Mac