<commit_before>define(function(require) {
  'use strict';

  var BaseModule = require('backend/modules/BaseModule');
  var youtubeDownloader = requireNode('youtube-dl');

  var TrackInfoFetcher = BaseModule(function() {
    this._options = ['--no-check-certificate'];
  });

  TrackInfoFetcher.prototype.getInfo = function(url) {
    var promise = new Promise((resolve, reject) => {
      youtubeDownloader.getInfo(url, this._options, (error, info) => {
        if (error) {
          this.debug(error);
          reject();
        } else {
          resolve(info);
        }
      });
    });
    return promise;
  };

  return new TrackInfoFetcher();<commit_msg>fixed #246, add no-cache-dir to make YTD work<commit_after>define(function(require) {
  'use strict';

  var BaseModule = require('backend/modules/BaseModule');
  var youtubeDownloader = requireNode('youtube-dl');

  var TrackInfoFetcher = BaseModule(function() {
    this._options = ['--no-check-certificate', '--no-cache-dir'];
  });

  TrackInfoFetcher.prototype.getInfo = function(url) {
    var promise = new Promise((resolve, reject) => {
      youtubeDownloader.getInfo(url, this._options, (error, info) => {
        if (error) {
          this.debug(error);
          reject();
        } else {
          resolve(info);
        }
      });
    });
    return promise;
  };

  return new TrackInfoFetcher();
{'fraction_non_alphanumeric': 0.14876632801161102, 'fraction_numerical': 0.0021770682148040637, 'mean_word_length': 2.8627450980392157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5987547', 'n_tokens_mistral': 423, 'n_tokens_neox': 410, 'n_words': 79}