bs4.dammit.EncodingDetector
- Suggests a number of possible encodings for a bytestring.bs4.dammit.UnicodeDammit
- A class for detecting the encoding of a *ML document and converting it to a Unicode string. If the source encoding is windows-1252, can replace MS smart quotes with their HTML or XML equivalents.Exception
bs4.builder.ParserRejectedMarkup
- An Exception to be raised when the underlying parser simply refuses to parse the given markup.bs4.StopParsing
- Exception raised by a TreeBuilder if it's unable to continue parsing.html.parser.HTMLParser
bs4.builder._htmlparser.BeautifulSoupHTMLParser
- A subclass of the Python standard library's HTMLParser class, which listens for HTMLParser events and translates them into calls to Beautiful Soup's tree construction API.bs4.diagnose.AnnouncingParser
- Subclass of HTMLParser that announces parse events, without doing anything else.html5lib.treebuilders._base.Node
bs4.builder._html5lib.Element
- No class docstring; 0/3 instance variable, 0/2 class variable, 1/11 method documentedbs4.builder._html5lib.TextNode
- Undocumentedhtml5lib.treebuilders._base.TreeBuilder
bs4.builder._html5lib.TreeBuilderForHtml5lib
- Undocumentedlist
bs4.element.ResultSet
- A ResultSet is just a list that keeps track of the SoupStrainer that created it.object
bs4.builder._html5lib.AttrList
- Undocumentedbs4.builder.DetectsXMLParsedAsHTML
- A mixin class for any class (a TreeBuilder, or some class used by a TreeBuilder) that's in a position to detect whether an XML document is being incorrectly parsed as HTML, and issue an appropriate warning.bs4.builder._htmlparser.BeautifulSoupHTMLParser
- A subclass of the Python standard library's HTMLParser class, which listens for HTMLParser events and translates them into calls to Beautiful Soup's tree construction API.bs4.builder.TreeBuilder
- Turn a textual document into a Beautiful Soup object tree.bs4.builder._lxml.LXMLTreeBuilderForXML
- No class docstring; 0/7 instance variable, 0/2 class variable, 0/5 constant, 8/17 methods documentedbs4.builder._lxml.LXMLTreeBuilder
- No class docstring; 0/1 instance variable, 0/2 class variable, 0/1 constant, 1/3 method documentedbs4.builder.HTMLTreeBuilder
- This TreeBuilder knows facts about HTML.bs4.builder._html5lib.HTML5TreeBuilder
- Use html5lib to build a tree.bs4.builder._htmlparser.HTMLParserTreeBuilder
- A Beautiful soup `TreeBuilder` that uses the `HTMLParser` parser, found in the Python standard library.bs4.builder._lxml.LXMLTreeBuilder
- No class docstring; 0/1 instance variable, 0/2 class variable, 0/1 constant, 1/3 method documentedbs4.builder.SAXTreeBuilder
- A Beautiful Soup treebuilder that listens for SAX events.bs4.builder.TreeBuilderRegistry
- A way of looking up TreeBuilder subclasses by their name or by desired features.bs4.dammit.EntitySubstitution
- The ability to substitute XML or HTML entities for certain characters.bs4.formatter.Formatter
- Describes a strategy to use when outputting a parse tree to a string.bs4.formatter.HTMLFormatter
- A generic Formatter for HTML.bs4.formatter.XMLFormatter
- A generic Formatter for XML.bs4.element.PageElement
- Contains the navigational information for some part of the page: that is, its current location in the parse tree.bs4.element.NavigableString
- A Python Unicode string that is part of a parse tree.bs4.element.PreformattedString
- A NavigableString not subject to the normal formatting rules.bs4.element.CData
- A CDATA block.bs4.element.Comment
- An HTML or XML comment.bs4.element.Declaration
- An XML declaration.bs4.element.Doctype
- A document type declaration.bs4.element.ProcessingInstruction
- A SGML processing instruction.bs4.element.XMLProcessingInstruction
- An XML processing instruction.bs4.element.RubyParenthesisString
- A NavigableString representing the contents of the <rp> HTML element.bs4.element.RubyTextString
- A NavigableString representing the contents of the <rt> HTML element.bs4.element.Script
- A NavigableString representing an executable script (probably Javascript).bs4.element.Stylesheet
- A NavigableString representing an stylesheet (probably CSS).bs4.element.TemplateString
- A NavigableString representing a string found inside an HTML template embedded in a larger document.bs4.element.Tag
- Represents an HTML or XML tag that is part of a parse tree, along with its attributes and contents.bs4.BeautifulSoup
- A data structure representing a parsed HTML or XML document.bs4.BeautifulStoneSoup
- Deprecated interface to an XML parser.bs4.element.SoupStrainer
- Encapsulates a number of ways of matching a markup element (tag or string).bs4.tests.SoupTest
- No class docstring; 0/1 property, 7/7 methods documentedbs4.tests.test_formatter.TestFormatter
- Undocumentedbs4.tests.test_html5lib.TestHTML5LibBuilder
- See ``HTML5TreeBuilderSmokeTest``.bs4.tests.test_htmlparser.TestHTMLParserTreeBuilder
- No class docstring; 1/8 method documentedbs4.tests.test_lxml.TestLXMLTreeBuilder
- See ``HTMLTreeBuilderSmokeTest``.bs4.tests.test_lxml.TestLXMLXMLTreeBuilder
- See ``HTMLTreeBuilderSmokeTest``.bs4.tests.test_navigablestring.TestNavigableString
- Undocumentedbs4.tests.test_navigablestring.TestNavigableStringSubclasses
- No class docstring; 0/1 instance variable, 1/6 method documentedbs4.tests.test_pageelement.TestCSSSelectors
- Test basic CSS selector functionality.bs4.tests.test_pageelement.TestEncoding
- Test the ability to encode objects into strings.bs4.tests.test_pageelement.TestFormatters
- Test the formatting feature, used by methods like decode() and prettify(), and the formatters themselves.bs4.tests.test_pageelement.TestPersistence
- Testing features like pickle and deepcopy.bs4.tests.test_soup.TestConstructor
- Undocumentedbs4.tests.test_soup.TestEncodingConversion
- Undocumentedbs4.tests.test_soup.TestNewString
- Test the BeautifulSoup.new_string() method.bs4.tests.test_soup.TestNewTag
- Test the BeautifulSoup.new_tag() method.bs4.tests.test_soup.TestPickle
- Undocumentedbs4.tests.test_soup.TestSelectiveParsing
- Undocumentedbs4.tests.test_soup.TestWarnings
- Undocumentedbs4.tests.test_tag.TestMultiValuedAttributes
- Test the behavior of multi-valued attributes like 'class'.bs4.tests.test_tag.TestTag
- Test various methods of Tag which aren't so complicated they need their own classes.bs4.tests.test_tree.ProximityTest
- Undocumentedbs4.tests.test_tree.TestNextOperations
- Undocumentedbs4.tests.test_tree.TestPreviousOperations
- Undocumentedbs4.tests.test_tree.SiblingTest
- Undocumentedbs4.tests.test_tree.TestNextSibling
- Undocumentedbs4.tests.test_tree.TestPreviousSibling
- Undocumentedbs4.tests.test_tree.TestDeprecatedArguments
- Undocumentedbs4.tests.test_tree.TestFind
- Basic tests of the find() method.bs4.tests.test_tree.TestFindAll
- Basic tests of the find_all() method.bs4.tests.test_tree.TestFindAllBasicNamespaces
- Undocumentedbs4.tests.test_tree.TestFindAllByAttribute
- Undocumentedbs4.tests.test_tree.TestFindAllByName
- Test ways of finding tags by tag name.bs4.tests.test_tree.TestIndex
- Test Tag.indexbs4.tests.test_tree.TestParentOperations
- Test navigation and searching through an element's parents.bs4.tests.test_tree.TestSmooth
- Test Tag.smooth.bs4.tests.test_tree.TestTreeModification
- No class docstring; 3/45 methods documentedbs4.tests.test_builder.TestDetectsXMLParsedAsHTML
- Undocumentedbs4.tests.test_builder_registry.TestBuiltInRegistry
- Test the built-in registry with the default builders registered.bs4.tests.test_builder_registry.TestRegistry
- Test the TreeBuilderRegistry class in general.bs4.tests.test_dammit.TestEncodingDetector
- Undocumentedbs4.tests.test_dammit.TestEntitySubstitution
- Standalone tests of the EntitySubstitution class.bs4.tests.test_dammit.TestUnicodeDammit
- Standalone tests of UnicodeDammit.bs4.tests.test_element.TestAttributeValueWithCharsetSubstitution
- Certain attributes are designed to have the charset of the final document substituted into their value.bs4.tests.test_element.TestNamedspacedAttribute
- Undocumentedbs4.tests.TreeBuilderSmokeTest
- Undocumentedbs4.tests.HTMLTreeBuilderSmokeTest
- A basic test of a treebuilder's competence.bs4.tests.HTML5TreeBuilderSmokeTest
- Smoke test for a tree builder that supports HTML5.bs4.tests.test_html5lib.TestHTML5LibBuilder
- See ``HTML5TreeBuilderSmokeTest``.bs4.tests.test_htmlparser.TestHTMLParserTreeBuilder
- No class docstring; 1/8 method documentedbs4.tests.test_lxml.TestLXMLTreeBuilder
- See ``HTMLTreeBuilderSmokeTest``.bs4.tests.XMLTreeBuilderSmokeTest
- No class docstring; 3/21 methods documentedbs4.tests.test_lxml.TestLXMLXMLTreeBuilder
- See ``HTMLTreeBuilderSmokeTest``.str
bs4.element.AttributeValueWithCharsetSubstitution
- A stand-in object for a character encoding specified in HTML.bs4.element.CharsetMetaAttributeValue
- A generic stand-in for the value of a meta tag's 'charset' attribute.bs4.element.ContentMetaAttributeValue
- A generic stand-in for the value of a meta tag's 'content' attribute.bs4.element.NamespacedAttribute
- A namespaced string (e.g. 'xml:lang') that remembers the namespace ('xml') and the name ('lang') that were used to create it.bs4.element.NavigableString
- A Python Unicode string that is part of a parse tree.bs4.element.PreformattedString
- A NavigableString not subject to the normal formatting rules.bs4.element.CData
- A CDATA block.bs4.element.Comment
- An HTML or XML comment.bs4.element.Declaration
- An XML declaration.bs4.element.Doctype
- A document type declaration.bs4.element.ProcessingInstruction
- A SGML processing instruction.bs4.element.XMLProcessingInstruction
- An XML processing instruction.bs4.element.RubyParenthesisString
- A NavigableString representing the contents of the <rp> HTML element.bs4.element.RubyTextString
- A NavigableString representing the contents of the <rt> HTML element.bs4.element.Script
- A NavigableString representing an executable script (probably Javascript).bs4.element.Stylesheet
- A NavigableString representing an stylesheet (probably CSS).bs4.element.TemplateString
- A NavigableString representing a string found inside an HTML template embedded in a larger document.UserWarning
bs4.builder.XMLParsedAsHTMLWarning
- The warning issued when an HTML parser is used to parse XML that is not XHTML.bs4.GuessedAtParserWarning
- The warning issued when BeautifulSoup has to guess what parser to use -- probably because no parser was specified in the constructor.bs4.MarkupResemblesLocatorWarning
- The warning issued when BeautifulSoup is given 'markup' that actually looks like a resource locator -- a URL or a path to a file on disk.ValueError
bs4.FeatureNotFound
- Exception raised by the BeautifulSoup constructor if no parser with the requested features is found.