<commit_before>(function () {
  'use strict';
  var request = require('request'),
      cheerio = require('cheerio'),
      Promise = require('bluebird'),
      debug   = require('debug')('sabesp:crawler'),
      Helper  = require('./Helper');

  Helper.dams = {
    'sistemaCantareira': 'Cantareira',
    'sistemaAltoTiete': 'Alto Tietê',
    'sistemaGuarapiranga': 'Guarapiranga',
    'sistemaCotia': 'Alto Cotia',
    'sistemaRioGrande': 'Rio Grande',
    'sistemaRioClaro': 'Rio Claro'
  };

  var url = 'http://www2.sabesp.com.br/mananciais/DivulgacaoSiteSabesp.aspx';

  var Sabesp = {};
  Sabesp.fetch = function(date, token) {
    return new Promise(function(resolve, reject) {
      var data = Helper.buildData(date, token);

      request({
          'url': url,
          'method': 'POST',
          'headers': {
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*-/*;q=0.8',
            'Host': 'www2.sabesp.com.br',
            'Origin': 'http://www2.sabesp.com.br',
            'Referer': url,
            'User-Agent': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',
          },
          'jar': true,
          'form': data,
        }, function(error, response, html){
          if (error) {<commit_msg>Change method request (#40)<commit_after>(function () {
  'use strict';
  var request = require('request'),
      cheerio = require('cheerio'),
      Promise = require('bluebird'),
      debug   = require('debug')('sabesp:crawler'),
      Helper  = require('./Helper');

  Helper.dams = {
    'sistemaCantareira': 'Cantareira',
    'sistemaAltoTiete': 'Alto Tietê',
    'sistemaGuarapiranga': 'Guarapiranga',
    'sistemaCotia': 'Alto Cotia',
    'sistemaRioGrande': 'Rio Grande',
    'sistemaRioClaro': 'Rio Claro'
  };

  var url = 'http://www2.sabesp.com.br/mananciais/DivulgacaoSiteSabesp.aspx';

  var Sabesp = {};
  Sabesp.fetch = function(date, token) {
    return new Promise(function(resolve, reject) {
      var data = Helper.buildData(date, token);

      request({
          'url': url,
          'method': 'GET',
          'headers': {
            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*-/*;q=0.8',
            'Host': 'www2.sabesp.com.br',
            'Origin': 'http://www2.sabesp.com.br',
            'Referer': url,
            'User-Agent': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.114 Safari/537.36',
          },
          'jar': true,
          'form': data,
        }, function(error, response, html){
          if (error) {
{'fraction_non_alphanumeric': 0.17491499811106914, 'fraction_numerical': 0.026445032111824706, 'mean_word_length': 2.6174863387978142, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 4}, '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': '7268119', 'n_tokens_mistral': 998, 'n_tokens_neox': 938, 'n_words': 165}