mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add ability to decrypt signature for vflxuxnEY/en_US/base.js
This commit is contained in:
parent
859517e206
commit
1e2139d78c
2 changed files with 24 additions and 1 deletions
|
@ -126,7 +126,14 @@ get "/watch" do |env|
|
|||
fmt_stream << HTTP::Params.parse(string)
|
||||
end
|
||||
|
||||
fmt_stream.reverse! # We want lowest quality first
|
||||
if fmt_stream[0]["s"]?
|
||||
fmt_stream.each do |fmt|
|
||||
fmt["url"] = "#{fmt["url"]}&signature=#{decrypt_signature(fmt["s"])}"
|
||||
end
|
||||
end
|
||||
|
||||
# We want lowest quality first
|
||||
fmt_stream.reverse!
|
||||
|
||||
adaptive_fmts = [] of HTTP::Params
|
||||
if video.info.has_key?("adaptive_fmts")
|
||||
|
@ -135,6 +142,12 @@ get "/watch" do |env|
|
|||
end
|
||||
end
|
||||
|
||||
if adaptive_fmts[0]["s"]?
|
||||
adaptive_fmts.each do |fmt|
|
||||
fmt["url"] = "#{fmt["url"]}&signature=#{decrypt_signature(fmt["s"])}"
|
||||
end
|
||||
end
|
||||
|
||||
rvs = [] of Hash(String, String)
|
||||
if video.info.has_key?("rvs")
|
||||
video.info["rvs"].split(",").each do |rv|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue