<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def html(self, url, timeout=None):
 """High level method to get http request response in text. smartly handle the encoding problem. """

        response = self.get_response(url, timeout=timeout)
        if response:
            domain = self.get_domain(url)
            if domain in self.domain_encoding_map:  # domain have been visited
                try:  # apply extreme decoding
                    html = self.decoder.decode(response.content,
                                               self.domain_encoding_map[domain])[0]
                    return html
                except Exception as e:
                    print(e)
                    return None
            else:  # never visit this domain
                try:
                    html, encoding = self.decoder.autodecode(response.content)
                    # save chardet analysis result
                    self.domain_encoding_map[domain] = encoding
                    return html
                except Exception as e:
                    print(e)
                    return None
        else:
            return None