Logo Search packages:      
Sourcecode: wapiti version File versions  Download package

BeautifulSoup Namespace Reference


Detailed Description

Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/

Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.

A well-structured XML/HTML document yields a well-behaved data
structure. An ill-structured XML/HTML document yields a
correspondingly ill-behaved data structure. If your document is only
locally well-structured, you can use this library to find and process
the well-structured part of it.

Beautiful Soup works with Python 2.2 and up. It has no external
dependencies, but you'll have more success at converting data to UTF-8
if you also install these three packages:

* chardet, for auto-detecting character encodings
  http://chardet.feedparser.org/
* cjkcodecs and iconv_codec, which add more encodings to the ones supported
  by stock Python.
  http://cjkpython.i18n.org/

Beautiful Soup defines classes for two main parsing strategies:
    
 * BeautifulStoneSoup, for parsing XML, SGML, or your domain-specific
   language that kind of looks like XML.

 * BeautifulSoup, for parsing run-of-the-mill HTML code, be it valid
   or invalid. This class has web browser-like heuristics for
   obtaining a sensible parse tree in the face of common HTML errors.

Beautiful Soup also defines a class (UnicodeDammit) for autodetecting
the encoding of an HTML or XML document, and converting it to
Unicode. Much of this code is taken from Mark Pilgrim's Universal Feed
Parser.

For more than you ever wanted to know about Beautiful Soup, see the
documentation:
http://www.crummy.com/software/BeautifulSoup/documentation.html


Classes

class  BeautifulSOAP
class  BeautifulSoup
class  BeautifulStoneSoup
class  CData
class  Comment
class  Declaration
class  ICantBelieveItsBeautifulSoup
class  MinimalSoup
class  NavigableString
class  PageElement
class  ProcessingInstruction
class  ResultSet
class  RobustHTMLParser
class  RobustInsanelyWackAssHTMLParser
class  RobustWackAssHTMLParser
class  RobustXMLParser
class  SimplifyingSOAPParser
class  SoupStrainer
class  StopParsing
class  Tag
class  UnicodeDammit

Functions

def buildTagMap
def isList
def isString

Variables

string __author__ = "Leonard Richardson (crummy.com)"
list __contributors__
string __copyright__ = "Copyright (c) 2004-2006 Leonard Richardson"
string __license__ = "PSF"
string __version__ = "3.0.3"
 chardet = None
string DEFAULT_OUTPUT_ENCODING = "utf-8"
tuple soup = BeautifulSoup(sys.stdin.read())


Generated by  Doxygen 1.6.0   Back to index