diff options
| author | Omar Roth <omarroth@protonmail.com> | 2019-11-09 14:18:19 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-11-09 14:22:39 -0500 |
| commit | 71bc9eea28ed6fb22992d774443f64ce1d1551be (patch) | |
| tree | 39f76ed95b55b6567b7399de2cd11c80bac88554 /src/invidious.cr | |
| parent | e3b2bcfd068831f9c12a39f4fe448b6614587f93 (diff) | |
| download | invidious-71bc9eea28ed6fb22992d774443f64ce1d1551be.tar.gz invidious-71bc9eea28ed6fb22992d774443f64ce1d1551be.tar.bz2 invidious-71bc9eea28ed6fb22992d774443f64ce1d1551be.zip | |
Add support for Anti-Captcha
Diffstat (limited to 'src/invidious.cr')
| -rw-r--r-- | src/invidious.cr | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 90b428f6..06f9e624 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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) |
