<commit_before>from ._abstract import AbstractScraper
from ._utils import get_minutes, normalize_string


class SimplyRecipes(AbstractScraper):

    @classmethod
    def host(self):
        return 'simplyrecipes.com'

    def title(self):
        return self.soup.find('h1').get_text()

    def total_time(self):
        return get_minutes(self.soup.find('span', {'class': 'preptime'})) +\
               get_minutes(self.soup.find('span', {'class': 'cooktime'}))

    def ingredients(self):
        ingredients_html = self.soup.findAll('li', {'class': "ingredient"})

        return [
            normalize_string(ingredient.get_text())
            for ingredient in ingredients_html
        ]

    def instructions(self):
        instructions_html = self.soup.find('div', {'itemprop': 'recipeInstructions'}).findAll('p')

        return '\n'.join([
            normalize_string(instruction.get_text())
            for instruction in instructions_html
        ])<commit_msg>Fix #16 missing ingredients on Simply Recipes<commit_after>from ._abstract import AbstractScraper
from ._utils import get_minutes, normalize_string


class SimplyRecipes(AbstractScraper):

    @classmethod
    def host(self):
        return 'simplyrecipes.com'

    def title(self):
        return self.soup.find('h1').get_text()

    def total_time(self):
        return get_minutes(self.soup.find('span', {'class': 'preptime'})) +\
               get_minutes(self.soup.find('span', {'class': 'cooktime'}))

    def ingredients(self):
        ingredients_html = self.soup.find('div', {'class':
            'recipe-ingredients'}).findAll('li')

        return [
            normalize_string(ingredient.get_text())
            for ingredient in ingredients_html
        ]

    def instructions(self):
        instructions_html = self.soup.find('div', {'itemprop': 'recipeInstructions'}).findAll('p')

        return '\n'.join([
            normalize_string(instruction.get_text())
            for instruction in instructions_html
        ])
{'fraction_non_alphanumeric': 0.12859980139026814, 'fraction_numerical': 0.0019860973187686196, 'mean_word_length': 2.912621359223301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6865945', 'n_tokens_mistral': 605, 'n_tokens_neox': 577, 'n_words': 114}