Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
bs4.dammit Namespace Reference

Classes

class  EncodingDetector
 
class  EntitySubstitution
 
class  UnicodeDammit
 

Functions

Optional[str] _chardet_dammit (bytes s)
 

Variables

Optional chardet_module = None
 
str xml_encoding = "^\\s*<\\?.*encoding=['\"](.*?)['\"].*\\?>"
 
tuple html_meta
 
Dict encoding_res = dict()
 

Detailed Description

Beautiful Soup bonus library: Unicode, Dammit

This library converts a bytestream to Unicode through any means
necessary. It is heavily based on code from Mark Pilgrim's `Universal
Feed Parser <https://pypi.org/project/feedparser/>`_, now maintained
by Kurt McKee. It does not rewrite the body of an XML or HTML document
to reflect a new encoding; that's the job of `TreeBuilder`.

Function Documentation

◆ _chardet_dammit()

Optional[str] bs4.dammit._chardet_dammit ( bytes  s)
protected
Try as hard as possible to detect the encoding of a bytestring.

Variable Documentation

◆ html_meta

tuple bs4.dammit.html_meta
Initial value:
1= (
2 "<\\s*meta[^>]+charset\\s*=\\s*[\"']?([^>]*?)[ /;'\">]" #: :meta private:
3)