def extract(self, post, extracted=None):
    soup = BeautifulSoup(post.rendered_body, 'html.parser')
    target_count = len(soup.find_all('ul'))
    lines_count = len(self.text.split('。'))
    ratio = ((target_count / lines_count) if (target_count != 0) else 0)
    return ratio
def extract(self, post, extracted=None):
    soup = BeautifulSoup(post.rendered_body, 'html.parser')
    target_count = len(soup.find_all('ul'))
    lines_count = len(self.text.split('。'))
    ratio = ((target_count / lines_count) if (target_count != 0) else 0)
    return ratio