mirror of
https://github.com/iv-org/invidious.git
synced 2025-06-29 01:58:30 +00:00
replace url by signatureCipher if url is not present
This commit is contained in:
parent
0c96e0977f
commit
b1e7e0c45e
@ -146,6 +146,9 @@ def extract_video_info(video_id : String)
|
|||||||
if streaming_data = player_response["streamingData"]?
|
if streaming_data = player_response["streamingData"]?
|
||||||
%w[formats adaptiveFormats].each do |key|
|
%w[formats adaptiveFormats].each do |key|
|
||||||
streaming_data.as_h[key]?.try &.as_a.each do |format|
|
streaming_data.as_h[key]?.try &.as_a.each do |format|
|
||||||
|
if format.as_h["url"].nil?
|
||||||
|
format.as_h["url"] = format.as_h["signatureCipher"]
|
||||||
|
end
|
||||||
format.as_h["url"] = JSON::Any.new(convert_url(format))
|
format.as_h["url"] = JSON::Any.new(convert_url(format))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user