<commit_before>// This script needs to be run using phantomjs
//
// Example usage:
// ~/.phantomjs/2.1.1/darwin/bin/phantomjs phantomjs/get.js

var page = require('webpage').create();
var system = require('system');

function doRender(page) {
  var html = page.evaluate(function() {
    // Magically this bit will get evaluated in the context of the page
    return document.documentElement.innerHTML;
  });
  console.log(html);

  phantom.exit();
}

if (system.args.length === 1) {
  console.log('Usage: get.js <some URL>');
  phantom.exit();
}
<commit_msg>Return outer html tag too<commit_after>// This script needs to be run using phantomjs
//
// Example usage:
// ~/.phantomjs/2.1.1/darwin/bin/phantomjs phantomjs/get.js

var page = require('webpage').create();
var system = require('system');

function doRender(page) {
  var html = page.evaluate(function() {
    // Magically this bit will get evaluated in the context of the page
    // TODO Also return doctype. This currently doesn't
    return document.documentElement.outerHTML;
  });
  console.log(html);

  phantom.exit();
}

if (system.args.length === 1) {
  console.log('Usage: get.js <some URL>');
  phantom.exit();
}

{'fraction_non_alphanumeric': 0.15033783783783783, 'fraction_numerical': 0.006756756756756757, 'mean_word_length': 3.6653543307086616, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3575358', 'n_tokens_mistral': 397, 'n_tokens_neox': 368, 'n_words': 107}