forked from Supositware/Haha-Yes
Don't use account to download
This commit is contained in:
parent
11781ebb6b
commit
1ecb71f44c
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue