<commit_before>module Hangry
  module Parsers
    module NonStandard
      class JamieOliverParser < HRecipeParser

        def parse_description
          recipe_ast.css(".instructions").css("i").first.content
        end

        def parse_instructions
          recipe_ast.css(".content").css(".instructions").map(&:content).join("\n") 
        end
      end
    end
  end
end<commit_msg>Since jamieoliver.com doesn’t have a canonical url, we need to search the HTML to see if we should try and use the non-standard parser.<commit_after>module Hangry
  module Parsers
    module NonStandard
      class JamieOliverParser < HRecipeParser

        def self.can_parse?(html)
          html.include?('jamieoliver.com')
        end

        def parse_description
          recipe_ast.css(".instructions").css("i").first.content
        end

        def parse_instructions
          recipe_ast.css(".content").css(".instructions").map(&:content).join("\n") 
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.096579476861167, 'fraction_numerical': 0.0, 'mean_word_length': 2.491228070175439, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3628233', 'n_tokens_mistral': 282, 'n_tokens_neox': 276, 'n_words': 68}