Answer the question
In order to leave comments, you need to log in
How to download 18+ videos from Youtube using youtube-dl?
The script copes with loading regular videos, but when it sees the 18+ tag, it throws an error.
As I understand it, the problem is that I can't log in even though the login/password is correct.
An attempt to attach a cookie file from my Firefox was also unsuccessful.
const youtubedl = require('youtube-dl')
let cookiesPath = '--cookies \"c:\\Users\\Max\\Documents\\GitHub\\test\\cookies.txt\"'
const url = 'https://www.youtube.com/watch?v=UMRNfWSwmPo'
youtubedl.exec(url, ['--format=18', '-u fakeLogin', '-p fakePass', cookiesPath],
{}, function (err, output) {
if (err) throw err;
console.log(output.join('\n'))
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question