def __get_contents_in_html(self, html):
    parts = re.split('(?i)<(?:body|frame).*?>', html, 1)
    if (len(parts) == 2):
        (head, body) = parts
    else:
        print(('Cannot split ' + self.path))
        body = html
    body = re.sub('(?i)<(script|style|select).*?>.*?</\\1\\s*>', ' ', body)
    body = re.sub(self.block_level_tags, ' _BLOCK_LEVEL_TAG_ ', body)
    body = re.sub('(?i)<a\\s.+?>', ' _ANCHOR_LEFT_TAG_ ', body)
    body = re.sub('(?i)</a>', ' _ANCHOR_RIGHT_TAG_ ', body)
    body = re.sub('(?i)<[/a-z].*?>', ' ', body)
    return re.sub(' +', ' ', ''.join(self.__get_contents_in_body(body)))
def __get_contents_in_html(self, html):
    parts = re.split('(?i)<(?:body|frame).*?>', html, 1)
    if (len(parts) == 2):
        (head, body) = parts
    else:
        print(('Cannot split ' + self.path))
        body = html
    body = re.sub('(?i)<(script|style|select).*?>.*?</\\1\\s*>', ' ', body)
    body = re.sub(self.block_level_tags, ' _BLOCK_LEVEL_TAG_ ', body)
    body = re.sub('(?i)<a\\s.+?>', ' _ANCHOR_LEFT_TAG_ ', body)
    body = re.sub('(?i)</a>', ' _ANCHOR_RIGHT_TAG_ ', body)
    body = re.sub('(?i)<[/a-z].*?>', ' ', body)
    return re.sub(' +', ' ', .join(self.__get_contents_in_body(body)))