bs4.Tag.decode

Tag.decode(indent_level=None, eventual_encoding='utf-8', formatter='minimal')[source]

Returns a Unicode representation of this tag and its contents.

Parameters:eventual_encoding – The tag is destined to be encoded into this encoding. This method is _not_ responsible for performing that encoding. This information is passed in so that it can be substituted in if the document contains a <META> tag that mentions the document’s encoding.