mirror of
https://github.com/TangentFoxy/.lua-files.git
synced 2024-11-20 21:34:23 +00:00
Revert "video-dl.lua uses browser cookies from Firefox now"
This reverts commit 1e09fb54bd
.
Fixes #12
This commit is contained in:
parent
c3733589a3
commit
72a474e7cf
10
video-dl.lua
10
video-dl.lua
@ -16,8 +16,6 @@ local help = [[Usage:
|
|||||||
on each.
|
on each.
|
||||||
<url>: Source. YouTube URL expected, but should work with anything
|
<url>: Source. YouTube URL expected, but should work with anything
|
||||||
yt-dlp works with.
|
yt-dlp works with.
|
||||||
|
|
||||||
IMPORTANT: Expects Firefox to be installed with a YouTube account logged in to get cookies from.
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
if os.execute("where yt-dlp") ~= 0 then
|
if os.execute("where yt-dlp") ~= 0 then
|
||||||
@ -41,16 +39,16 @@ end
|
|||||||
|
|
||||||
local execute = {
|
local execute = {
|
||||||
backup = function(url)
|
backup = function(url)
|
||||||
os.execute("yt-dlp --retries 100 --write-sub --write-auto-sub --sub-lang \"en.*\" --write-thumbnail --write-description -f \"bestvideo[height<=720]+bestaudio/best[height<=720]\" \"" .. url .."\" --cookies-from-browser \"firefox\"")
|
os.execute("yt-dlp --retries 100 --write-sub --write-auto-sub --sub-lang \"en.*\" --write-thumbnail --write-description -f \"bestvideo[height<=720]+bestaudio/best[height<=720]\" \"" .. url .."\"")
|
||||||
end,
|
end,
|
||||||
music = function(url)
|
music = function(url)
|
||||||
os.execute("yt-dlp --retries 100 -x --audio-quality 0 \"" .. url .."\" --cookies-from-browser \"firefox\"")
|
os.execute("yt-dlp --retries 100 -x --audio-quality 0 \"" .. url .."\"")
|
||||||
end,
|
end,
|
||||||
metadata = function(url)
|
metadata = function(url)
|
||||||
os.execute("yt-dlp --retries 100 --write-sub --write-auto-sub --sub-lang \"en.*\" --write-thumbnail --write-description --skip-download \"" .. url .."\" --cookies-from-browser \"firefox\"")
|
os.execute("yt-dlp --retries 100 --write-sub --write-auto-sub --sub-lang \"en.*\" --write-thumbnail --write-description --skip-download \"" .. url .."\"")
|
||||||
end,
|
end,
|
||||||
video = function(url)
|
video = function(url)
|
||||||
os.execute("yt-dlp --retries 100 -f \"bestvideo[height<=720]+bestaudio/best[height<=720]\" \"" .. url .. "\" --cookies-from-browser \"firefox\"")
|
os.execute("yt-dlp --retries 100 -f \"bestvideo[height<=720]+bestaudio/best[height<=720]\" \"" .. url .. "\"")
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
execute.clone = execute.backup
|
execute.clone = execute.backup
|
||||||
|
Loading…
Reference in New Issue
Block a user