code: def get_encodings_from_content(content):
      
  
      charset_re = re.compile(r'<meta.*?charset=["\']*(.+?)["\'>]', flags=re.I)
      pragma_re = re.compile(r'<meta.*?content=["\']*;?charset=(.+?)["\'>]', flags=re.I)
      xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]')
  
      return (charset_re.findall(content) +
              pragma_re.findall(content) +
              xml_re.findall(content))
docs: Returns encodings from given content string.
  
      :param content: bytestring to extract encodings from.