<commit_before>require 'nokogiri'
require 'open-uri'
require 'open_uri_redirections'

class NiceCrawler
  def initialize(url)
    fail 'url is required' if url.empty?

    @base_url    = build_base_url(url)

    @sitemap     = []

    @crawl_queue = [@base_url]
  end

  def crawl
    @crawl_queue.each do |url|
      crawl_url(url)
    end

    @sitemap.to_json
  end

  private
<commit_msg>Removing spaces<commit_after>require 'nokogiri'
require 'open-uri'
require 'open_uri_redirections'

class NiceCrawler
  def initialize(url)
    fail 'url is required' if url.empty?

    @base_url    = build_base_url(url)
    @sitemap     = []
    @crawl_queue = [@base_url]
  end

  def crawl
    @crawl_queue.each do |url|
      crawl_url(url)
    end

    @sitemap.to_json
  end

  private

{'fraction_non_alphanumeric': 0.09438775510204081, 'fraction_numerical': 0.0, 'mean_word_length': 3.0051020408163267, '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': '5902553', 'n_tokens_mistral': 315, 'n_tokens_neox': 294, 'n_words': 65}