bs4.BeautifulSoup.encode

BeautifulSoup.encode(encoding='utf-8', indent_level=None, formatter='minimal', errors='xmlcharrefreplace')