Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
bs4/ | 07-May-2024 | - | 7,392 | 5,474 | ||
doc/ | 07-May-2024 | - | 3,438 | 2,410 | ||
scripts/ | 07-May-2024 | - | 131 | 115 | ||
AUTHORS.txt | D | 07-May-2024 | 1.7 KiB | 44 | 32 | |
COPYING.txt | D | 07-May-2024 | 1.2 KiB | 27 | 21 | |
NEWS.txt | D | 07-May-2024 | 39.8 KiB | 1,067 | 746 | |
PKG-INFO | D | 07-May-2024 | 912 | 21 | 20 | |
README.chromium | D | 07-May-2024 | 259 | 12 | 9 | |
README.txt | D | 07-May-2024 | 1.5 KiB | 64 | 51 | |
TODO.txt | D | 07-May-2024 | 1.1 KiB | 32 | 23 | |
setup.py | D | 07-May-2024 | 1.3 KiB | 30 | 26 |
README.chromium
1Name: BeautifulSoup 2Short Name: bs4 3URL: http://www.crummy.com/software/BeautifulSoup/ 4Version: 4.3.2 5License: MIT 6 7Description: 8Beautiful Soup is a library for HTML parsing. 9It's included in catapult because webtest depends on it. 10 11Local Modifications: None 12
README.txt
1= Introduction = 2 3 >>> from bs4 import BeautifulSoup 4 >>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML") 5 >>> print soup.prettify() 6 <html> 7 <body> 8 <p> 9 Some 10 <b> 11 bad 12 <i> 13 HTML 14 </i> 15 </b> 16 </p> 17 </body> 18 </html> 19 >>> soup.find(text="bad") 20 u'bad' 21 22 >>> soup.i 23 <i>HTML</i> 24 25 >>> soup = BeautifulSoup("<tag1>Some<tag2/>bad<tag3>XML", "xml") 26 >>> print soup.prettify() 27 <?xml version="1.0" encoding="utf-8"> 28 <tag1> 29 Some 30 <tag2 /> 31 bad 32 <tag3> 33 XML 34 </tag3> 35 </tag1> 36 37= Full documentation = 38 39The bs4/doc/ directory contains full documentation in Sphinx 40format. Run "make html" in that directory to create HTML 41documentation. 42 43= Running the unit tests = 44 45Beautiful Soup supports unit test discovery from the project root directory: 46 47 $ nosetests 48 49 $ python -m unittest discover -s bs4 # Python 2.7 and up 50 51If you checked out the source tree, you should see a script in the 52home directory called test-all-versions. This script will run the unit 53tests under Python 2.7, then create a temporary Python 3 conversion of 54the source and run the unit tests again under Python 3. 55 56= Links = 57 58Homepage: http://www.crummy.com/software/BeautifulSoup/bs4/ 59Documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/ 60 http://readthedocs.org/docs/beautiful-soup-4/ 61Discussion group: http://groups.google.com/group/beautifulsoup/ 62Development: https://code.launchpad.net/beautifulsoup/ 63Bug tracker: https://bugs.launchpad.net/beautifulsoup/ 64