<commit_before>var express = require('express'),
    fs = require('fs'),
    request = require('request'),
    cheerio = require('cheerio'),
    app = express();

app.get('/scrape', function(req, res){

  url = 'http://www.imdb.com/title/tt0421054/';

  request(url, function(error, response, html){

      if(!error){

          var $ = cheerio.load(html);

          var title, release, rating;
          var json = { title : "", release : "", rating : ""};

          $('.header').filter(function () {
              var data = $(this);
              title = data.children().first().text();

              release = data.children().last().children().text();

              json.title = title;
              json.release = release;
          });
        }
    });
});

app.listen('8081');
console.log('Magic happens on port 8081');

exports = module.exports = app;<commit_msg>Community Rating function added<commit_after>var express = require('express'),
    fs = require('fs'),
    request = require('request'),
    cheerio = require('cheerio'),
    app = express();

app.get('/scrape', function(req, res){

  url = 'http://www.imdb.com/title/tt0421054/';

  request(url, function(error, response, html){

      if(!error){

          var $ = cheerio.load(html);

          var title, release, rating;
          var json = { title : "", release : "", rating : ""};

          $('.header').filter(function () {
              var data = $(this);
              title = data.children().first().text();

              release = data.children().last().children().text();

              json.title = title;
              json.release = release;
          });

          $('.star-box-giga-star').filter(function() {
              var data = $(this);
              rating = data.text();
              json.rating = rating;
          });
        }
    });
});

app.listen('8081');
console.log('Magic happens on port 8081');

exports = module.exports = app;
{'fraction_non_alphanumeric': 0.1806981519507187, 'fraction_numerical': 0.015400410677618069, 'mean_word_length': 2.069291338582677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7499925', 'n_tokens_mistral': 579, 'n_tokens_neox': 539, 'n_words': 116}