<commit_before>(function () {
  function normalize(str) {
    return str.replace(/[\u00A0\u1680​\u180e\u2000-\u2009\u200a​\u200b​\u202f\u205f​\u3000]/g,' ')
  }
  function extractRegulars() {
    const list = document.querySelectorAll('.team-players li .team-player');
    const names= [];

    list.forEach(el => names.push(el.textContent.trim().toLowerCase()));

    return names;
  }

  function extractSubstitutions() {
    const listHome = document.querySelectorAll('.homeDetails p')[0].textContent.split(',');
    const listAway = document.querySelectorAll('.awayDetails p')[0].textContent.split(',');
    const names = [];
    const extractName = (name) => normalize(name).match(/[0-9]+\ ([A-Z\ -]+)/);

    listHome.forEach(el => names.push(extractName));

    return names;
  }

  function extractIndecisions() {

  }

  function extractNotAvailable() {

  }

  function init() {
    const data = {
      regulars: extractRegulars(),
      substitutions: extractSubstitutions(),
    }

    console.log(data);
  }

  init();

})();<commit_msg>Add gazzetta scraper script<commit_after>(function () {
  const CONTAINER_SELECTOR = '.probabiliFormazioni';
  const REGULARS_SELECTOR = '.team-players li .team-player';
  const SUBSTITUTIONS_HOME_SELECTOR = '.homeDetails>p';
  const SUBSTITUTIONS_AWAY_SELECTOR = '.awayDetails>p';

  const extractRegulars = _.compose(
    Utils.toLowerCase,
    _.map(Utils.normalize),
    _.map(Utils.extractText),
    Utils.getDOMElements(REGULARS_SELECTOR),
  );
  const getSubstitutions = container => _.concat(
    Array.from(Utils.getDOMElements(SUBSTITUTIONS_HOME_SELECTOR, container)),
    Array.from(Utils.getDOMElements(SUBSTITUTIONS_AWAY_SELECTOR, container)),
  );

  const extractSubstitutions = _.compose(
    Utils.toLowerCase,
    _.map(Utils.normalize),
    _.map(Utils.extractText),
    getSubstitutions,
  );

  function init() {
    const container = Utils.getContainer(CONTAINER_SELECTOR);
    const data = {
      regulars: extractRegulars(container),
      substitutions: extractSubstitutions(container),
      updateDate: Utils.getCurrentTimestamp()
    }
  }

  init();
})();
{'fraction_non_alphanumeric': 0.14559925093632958, 'fraction_numerical': 0.017790262172284643, 'mean_word_length': 3.935334872979215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '764074', 'n_tokens_mistral': 747, 'n_tokens_neox': 689, 'n_words': 107}