<commit_before>const path = require('path');
const fs   = require('fs');
const ytdl = require('..');
const id  = '7wNb0pHyGuI';

const filepath = path.resolve(__dirname, 'info.json');

ytdl.getInfo(id, (err, info) => {
  if (err) throw err;
  console.log('title:', info.title);
  console.log('rating:', info.avg_rating);
  console.log('uploaded by:', info.author.name);
  const json = JSON.stringify(info, null, 2)
    .replace(/(ip(?:=|%3D|\/))((?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|[0-9a-f]{1,4}(?:(?::|%3A)[0-9a-f]{1,4}){7})/ig, '$10.0.0.0');
  fs.writeFile(filepath, json, err => {
    if (err) throw err;
  });
});<commit_msg>docs(example): update path to average rating<commit_after>const path = require('path');
const fs   = require('fs');
const ytdl = require('..');
const id  = '7wNb0pHyGuI';

const filepath = path.resolve(__dirname, 'info.json');

ytdl.getInfo(id, (err, info) => {
  if (err) throw err;
  console.log('title:', info.title);
  console.log('rating:', info.player_response.videoDetails.averageRating);
  console.log('uploaded by:', info.author.name);
  const json = JSON.stringify(info, null, 2)
    .replace(/(ip(?:=|%3D|\/))((?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|[0-9a-f]{1,4}(?:(?::|%3A)[0-9a-f]{1,4}){7})/ig, '$10.0.0.0');
  fs.writeFile(filepath, json, err => {
    if (err) throw err;
  });
});
{'fraction_non_alphanumeric': 0.28930366116295764, 'fraction_numerical': 0.054558506819813356, 'mean_word_length': 4.620967741935484, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4076570', 'n_tokens_mistral': 637, 'n_tokens_neox': 622, 'n_words': 93}