Fix UserAgent
This commit is contained in:
parent
e38c99709d
commit
3886428438
@ -157,7 +157,11 @@ class DownloadVideo {
|
||||
}
|
||||
|
||||
const result = await new Promise((resolve, reject) => {
|
||||
const child = spawn("yt-dlp", ["--cookies", "cookies.txt", "-j", this.url]);
|
||||
const child = spawn("yt-dlp", [
|
||||
"--cookies", "cookies.txt",
|
||||
"--user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
|
||||
"-j", this.url
|
||||
]);
|
||||
|
||||
let data = "";
|
||||
|
||||
@ -212,7 +216,11 @@ class DownloadVideo {
|
||||
}
|
||||
|
||||
const result = await new Promise((resolve, reject) => {
|
||||
const child = spawn("yt-dlp", ["--cookies", "cookies.txt", "-j", this.url]);
|
||||
const child = spawn("yt-dlp", [
|
||||
"--cookies", "cookies.txt",
|
||||
"--user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
|
||||
"-j", this.url
|
||||
]);
|
||||
let data = "";
|
||||
|
||||
child.stdout.on("data", (chunk) => (data += chunk.toString()));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user