Don't force youtube-dl host

This commit is contained in:
Chocobozzz
2021-09-08 16:55:42 +02:00
parent 1c93ad0778
commit 414f77c8d8

View File

@@ -351,7 +351,7 @@ class YoutubeDL {
}
const newUrl = result.headers.location
const newVersion = /yt-dl\.org\/downloads\/(\d{4}\.\d\d\.\d\d(\.\d)?)\/youtube-dl/.exec(newUrl)[1]
const newVersion = /\/(\d{4}\.\d\d\.\d\d(\.\d)?)\/youtube-dl$/.exec(newUrl)[1]
const downloadFileStream = got.stream(newUrl)
const writeStream = createWriteStream(bin, { mode: 493 })