Add support for Anti-Captcha

This commit is contained in:
Omar Roth 2019-11-09 14:18:19 -05:00
parent e3b2bcfd06
commit 71bc9eea28
No known key found for this signature in database
GPG key ID: B8254FB7EC3D37F2
4 changed files with 106 additions and 2 deletions

View file

@ -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)