from html.parser import HTMLParser
parser = HTMLParser()
parser.unescape('\xd0\xbe\xd0\xbf\xd0\xb0')
print(parser.unescape('\xd0\xbe\xd0\xbf\xd0\xb0'))
Convert string from xmlcharrefreplace back to utf-8