Public Member Functions | |
def | __init__ |
def | start_meta |
Public Member Functions inherited from BeautifulSoup.BeautifulStoneSoup | |
def | __getattr__ |
def | __init__ |
def | convert_charref |
def | endData |
def | handle_charref |
def | handle_comment |
def | handle_data |
def | handle_decl |
def | handle_entityref |
def | handle_pi |
def | isSelfClosingTag |
def | parse_declaration |
def | popTag |
def | pushTag |
def | reset |
def | unknown_endtag |
def | unknown_starttag |
Public Member Functions inherited from BeautifulSoup.Tag | |
def | __call__ |
def | __contains__ |
def | __delitem__ |
def | __eq__ |
def | __getattr__ |
def | __getitem__ |
def | __init__ |
def | __iter__ |
def | __len__ |
def | __ne__ |
def | __nonzero__ |
def | __repr__ |
def | __setitem__ |
def | __str__ |
def | __unicode__ |
def | childGenerator |
def | clear |
def | decompose |
def | fetchText |
def | find |
def | findAll |
def | firstText |
def | get |
def | getString |
def | getText |
def | has_key |
def | index |
def | prettify |
def | recursiveChildGenerator |
def | renderContents |
def | setString |
Static Public Attributes | |
tuple | CHARSET_RE = re.compile("((^|;)\s*charset=)([^;]*)", re.M) |
tuple | NESTABLE_BLOCK_TAGS = ('blockquote', 'div', 'fieldset', 'ins', 'del') |
tuple | NESTABLE_INLINE_TAGS |
dictionary | NESTABLE_LIST_TAGS |
dictionary | NESTABLE_TABLE_TAGS |
tuple | NESTABLE_TAGS |
tuple | NON_NESTABLE_BLOCK_TAGS = ('address', 'form', 'p', 'pre') |
tuple | PRESERVE_WHITESPACE_TAGS = set(['pre', 'textarea']) |
dictionary | QUOTE_TAGS = {'script' : None, 'textarea' : None} |
tuple | RESET_NESTING_TAGS |
tuple | SELF_CLOSING_TAGS |
Static Public Attributes inherited from BeautifulSoup.BeautifulStoneSoup | |
ALL_ENTITIES = XHTML_ENTITIES | |
string | HTML_ENTITIES = "html" |
list | MARKUP_MASSAGE |
dictionary | NESTABLE_TAGS = {} |
list | PRESERVE_WHITESPACE_TAGS = [] |
dictionary | QUOTE_TAGS = {} |
dictionary | RESET_NESTING_TAGS = {} |
string | ROOT_TAG_NAME = u'[document]' |
dictionary | SELF_CLOSING_TAGS = {} |
dictionary | STRIP_ASCII_SPACES = { 9: None, 10: None, 12: None, 13: None, 32: None, } |
string | XHTML_ENTITIES = "xhtml" |
string | XML_ENTITIES = "xml" |
Static Public Attributes inherited from BeautifulSoup.Tag | |
fetch = findAll | |
findChild = find | |
findChildren = findAll | |
first = find | |
Additional Inherited Members | |
Properties inherited from BeautifulSoup.Tag | |
string = property(getString, setString) | |
text = property(getText) | |
This parser knows the following facts about HTML: * Some tags have no closing tag and should be interpreted as being closed as soon as they are encountered. * The text inside some tags (ie. 'script') may contain tags which are not really part of the document and which should be parsed as text, not tags. If you want to parse the text as tags, you can always fetch it and parse it explicitly. * Tag nesting rules: Most tags can't be nested at all. For instance, the occurance of a <p> tag should implicitly close the previous <p> tag. <p>Para1<p>Para2 should be transformed into: <p>Para1</p><p>Para2 Some tags can be nested arbitrarily. For instance, the occurance of a <blockquote> tag should _not_ implicitly close the previous <blockquote> tag. Alice said: <blockquote>Bob said: <blockquote>Blah should NOT be transformed into: Alice said: <blockquote>Bob said: </blockquote><blockquote>Blah Some tags can be nested, but the nesting is reset by the interposition of other tags. For instance, a <tr> tag should implicitly close the previous <tr> tag within the same <table>, but not close a <tr> tag in another table. <table><tr>Blah<tr>Blah should be transformed into: <table><tr>Blah</tr><tr>Blah but, <tr>Blah<table><tr>Blah should NOT be transformed into <tr>Blah<table></tr><tr>Blah Differing assumptions about tag nesting rules are a major source of problems with the BeautifulSoup class. If BeautifulSoup is not treating as nestable a tag your page author treats as nestable, try ICantBelieveItsBeautifulSoup, MinimalSoup, or BeautifulStoneSoup before writing your own subclass.
Definition at line 1470 of file BeautifulSoup.py.
def BeautifulSoup.BeautifulSoup.__init__ | ( | self, | |
args, | |||
kwargs | |||
) |
Definition at line 1518 of file BeautifulSoup.py.
References BeautifulSoup.BeautifulStoneSoup.HTML_ENTITIES.
def BeautifulSoup.BeautifulSoup.start_meta | ( | self, | |
attrs | |||
) |
Beautiful Soup can detect a charset included in a META tag, try to convert the document to that charset, and re-parse the document from the beginning.
Definition at line 1576 of file BeautifulSoup.py.
References BeautifulSoup.BeautifulStoneSoup.declaredHTMLEncoding.
|
static |
Definition at line 1574 of file BeautifulSoup.py.
BeautifulSoup.BeautifulSoup.declaredHTMLEncoding |
Definition at line 1615 of file BeautifulSoup.py.
Referenced by BeautifulSoup.UnicodeDammit._detectEncoding().
|
static |
Definition at line 1541 of file BeautifulSoup.py.
|
static |
Definition at line 1535 of file BeautifulSoup.py.
|
static |
Definition at line 1544 of file BeautifulSoup.py.
|
static |
Definition at line 1552 of file BeautifulSoup.py.
|
static |
Definition at line 1570 of file BeautifulSoup.py.
|
static |
Definition at line 1561 of file BeautifulSoup.py.
BeautifulSoup.BeautifulSoup.originalEncoding |
Definition at line 1598 of file BeautifulSoup.py.
|
static |
Definition at line 1528 of file BeautifulSoup.py.
|
static |
Definition at line 1530 of file BeautifulSoup.py.
|
static |
Definition at line 1565 of file BeautifulSoup.py.
|
static |
Definition at line 1524 of file BeautifulSoup.py.