mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Add support for Anti-Captcha
This commit is contained in:
parent
e3b2bcfd06
commit
71bc9eea28
4 changed files with 106 additions and 2 deletions
|
@ -212,6 +212,19 @@ spawn do
|
|||
end
|
||||
end
|
||||
|
||||
if CONFIG.captcha_key
|
||||
spawn do
|
||||
bypass_captcha(CONFIG.captcha_key, logger) do |cookies|
|
||||
cookies.each do |cookie|
|
||||
config.cookies << cookie
|
||||
end
|
||||
|
||||
# Persist cookies between runs
|
||||
File.write("config/config.yml", config.to_yaml)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
connection_channel = Channel({Bool, Channel(PQ::Notification)}).new(32)
|
||||
spawn do
|
||||
connections = [] of Channel(PQ::Notification)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue