mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-03-09 15:49:33 +00:00
Try to speed up find_working_proxies
This commit is contained in:
@@ -543,6 +543,10 @@ def fetch_video(id, proxies)
|
||||
|
||||
proxies.each do |region, list|
|
||||
spawn do
|
||||
info = HTTP::Params.new({
|
||||
"reason" => [info["reason"]],
|
||||
})
|
||||
|
||||
list.each do |proxy|
|
||||
begin
|
||||
client = HTTPClient.new(YT_URL)
|
||||
@@ -563,6 +567,11 @@ def fetch_video(id, proxies)
|
||||
rescue ex
|
||||
end
|
||||
end
|
||||
|
||||
# If none of the proxies we tried returned a valid response
|
||||
if info["reason"]?
|
||||
bypass_channel.send(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user