def get_encodings_from_content(content):
 charset_re = re.compile('<meta.*?charset=["\\\']*(.+?)["\\\'>]', flags=re.I)
 return charset_re.findall(content)

def get_encodings_from_content ( content ) : charset_re = re . compile ( '<meta.*?charset=["\\\']*(.+?)["\\\'>]' , flags = re . I ) return charset_re . findall ( content )
returns encodings from given content string .