<commit_before>var util = require("util");
var Resource = require("./resource");
var fs = require('fs');
var _ = require('underscore');
var request = require("request-promise");
var CookieStorage = require("./cookie-storage");
var RequestJar = require("./jar");

function Session(device, storage) {
    this.setDevice(device);    
    this.setCookiesStorage(storage);
}

util.inherits(Session, Resource);
module.exports = Session;

var CONSTANTS = require("./constants");
var Account = require('./account');
var Exceptions = require('./exceptions');
var Request = require('./request');
var Device = require("./device");
var QE = require("./qe");
var Megaphone = require("./megaphone");
var Timeline = require("./feeds/timeline-feed");<commit_msg>Restored session can now be created with proxyUrl<commit_after>var util = require("util");
var Resource = require("./resource");
var fs = require('fs');
var _ = require('underscore');
var request = require("request-promise");
var CookieStorage = require("./cookie-storage");
var RequestJar = require("./jar");

function Session(device, storage, proxy) {
    this.setDevice(device);    
    this.setCookiesStorage(storage);
    if(_.isString(proxy) && !_.isEmpty(proxy))
        this.proxyUrl = proxy;
}

util.inherits(Session, Resource);
module.exports = Session;

var CONSTANTS = require("./constants");
var Account = require('./account');
var Exceptions = require('./exceptions');
var Request = require('./request');
var Device = require("./device");
var QE = require("./qe");
var Megaphone = require("./megaphone");
var Timeline = require("./feeds/timeline-feed");
{'fraction_non_alphanumeric': 0.18288902665840048, 'fraction_numerical': 0.0, 'mean_word_length': 5.1603053435114505, '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': '72428', 'n_tokens_mistral': 474, 'n_tokens_neox': 467, 'n_words': 117}