<commit_before>module Api
  class Blog
    include HTTParty

    def self.find_by_country(country)
      response = HTTParty.get("#{ENV['BLOG_HOST']}/", query: { tag: country['name'].downcase.gsub(" ", "_"), feed: "rss2" })

      blog_stories = []

      if response['rss']['channel']['item'].present?
        response['rss']['channel']['item'].is_a?(Array) ? response['rss']['channel']['item'][0] : response['rss']['channel']['item']
      else
        nil
      end
    end
  end
end<commit_msg>HOTFIX: avoid 500 if blog stories fail<commit_after>module Api
  class Blog
    include HTTParty

    def self.find_by_country(country)
      response = HTTParty.get("http://marca.com/", query: { tag: country['name'].downcase.gsub(" ", "_"), feed: "rss2" })

      blog_stories = []

      if response['rss']['channel']['item'].present?
        response['rss']['channel']['item'].is_a?(Array) ? response['rss']['channel']['item'][0] : response['rss']['channel']['item']
      end rescue nil
    end
  end
end
{'fraction_non_alphanumeric': 0.20278330019880716, 'fraction_numerical': 0.006958250497017893, 'mean_word_length': 3.795238095238095, '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': '3548937', 'n_tokens_mistral': 317, 'n_tokens_neox': 314, 'n_words': 59}