Windows Platform installation beautiful Soup
2013-04-01 09:31:23| Category: Python| Report | Font size Subscription
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." Valuable data that is hard to access on some poorly designed websites 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.
Windows Platform installation Beautiful Soup