Don't use account to download

This commit is contained in:
loicbersier 2019-09-11 17:32:55 +02:00
parent 11781ebb6b
commit 1ecb71f44c

View file

@ -2,7 +2,6 @@ const { Command } = require('discord-akairo');
const fs = require('fs'); const fs = require('fs');
const youtubedl = require('youtube-dl'); const youtubedl = require('youtube-dl');
const hbjs = require('handbrake-js'); const hbjs = require('handbrake-js');
const { fbuser, fbpasswd } = require('../../config.json');
class DownloadCommand extends Command { class DownloadCommand extends Command {
constructor() { constructor() {
@ -69,7 +68,7 @@ class DownloadCommand extends Command {
} }
let video = youtubedl(link, [`--username=${fbuser}`, `--password=${fbpasswd}`]); let video = youtubedl(link);
video.pipe(fs.createWriteStream(`./${fileName}.mp4`)); video.pipe(fs.createWriteStream(`./${fileName}.mp4`));
video.on('error', function error(err) { video.on('error', function error(err) {
console.log('error 2:', err); console.log('error 2:', err);