def get_txt_page_encode(raw:str) -> str: try: encode = StringHelper.extra_equ_value(raw, 'charset', '"') encode = StringHelper.cutfrom(encode, '/') return encode except HttpConnectionFailedException as e: raise e except: return ''
def get_page_encode(self, url): try: raw = self.req.get(url) encode = StringHelper.extra_equ_value(raw, 'charset', '"') encode = StringHelper.cutfrom(encode,'/') return encode except HttpConnectionFailedException as e: raise e except: return ''