<commit_before>var assert  = require('assert');
var request = require('request');
var nock    = require('nock');
var ytdl    = require('..');


var videos = [
  'http://www.youtube.com/watch?v=qQ31INpjXX0',
  'http://www.youtube.com/watch?v=pJk0p-98Xzc',
  'http://www.youtube.com/watch?v=mgOS64BF2eU',
  'http://www.youtube.com/watch?v=qQ31INpjXX0',
  'http://www.youtube.com/watch?v=mvuqS0nxFvA'
];


describe('Try downloading videos without mocking', function() {
  before(function() {
    nock.restore();
  });

  videos.forEach(function(video) {
    describe(video, function() {
      it('Request status code is not 403 Forbidden', function(done) {
        ytdl.getInfo(video, { downloadURL: true }, function(err, info) {
          if (err) return done(err);

          var url = info.formats[0].url;
          var req = request(url);
          req.on('response', function(res) {
            assert.equal(res.statusCode, 200);
            req.abort();
            done();
          });
          req.on('error', done);
        });<commit_msg>turn off cache for irl tests<commit_after>var assert  = require('assert');
var request = require('request');
var nock    = require('nock');
var ytdl    = require('..');


var videos = [
  'http://www.youtube.com/watch?v=qQ31INpjXX0',
  'http://www.youtube.com/watch?v=pJk0p-98Xzc',
  'http://www.youtube.com/watch?v=mgOS64BF2eU',
  'http://www.youtube.com/watch?v=qQ31INpjXX0',
  'http://www.youtube.com/watch?v=mvuqS0nxFvA'
];


describe('Try downloading videos without mocking', function() {
  before(function() {
    nock.restore();
    ytdl.cache = null;
  });

  videos.forEach(function(video) {
    describe(video, function() {
      it('Request status code is not 403 Forbidden', function(done) {
        ytdl.getInfo(video, { downloadURL: true }, function(err, info) {
          if (err) return done(err);

          var url = info.formats[0].url;
          var req = request(url);
          req.on('response', function(res) {
            assert.equal(res.statusCode, 200);
            req.abort();
            done();
          });
          req.on('error', done);
        });
{'fraction_non_alphanumeric': 0.17307692307692307, 'fraction_numerical': 0.01876172607879925, 'mean_word_length': 2.795373665480427, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, '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': '1951778', 'n_tokens_mistral': 759, 'n_tokens_neox': 725, 'n_words': 129}