mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-05-04 02:30:53 +02:00
Fixed: (Cardigann) Don't check for captcha when captcha answer is empty
This commit is contained in:
parent
e8139f2a5b
commit
6afa1dc8ba
1 changed files with 5 additions and 3 deletions
|
|
@ -400,16 +400,18 @@ public async Task DoLogin()
|
|||
if (login.Captcha != null)
|
||||
{
|
||||
var captcha = login.Captcha;
|
||||
Settings.ExtraFieldData.TryGetValue("CAPTCHA", out var captchaText);
|
||||
if (captchaText != null)
|
||||
|
||||
if (Settings.ExtraFieldData.TryGetValue("CAPTCHA", out var captchaText) && ((string)captchaText).IsNotNullOrWhiteSpace())
|
||||
{
|
||||
var input = captcha.Input;
|
||||
|
||||
if (login.Selectors)
|
||||
{
|
||||
var inputElement = landingResultDocument.QuerySelector(captcha.Input);
|
||||
|
||||
if (inputElement == null)
|
||||
{
|
||||
throw new CardigannConfigException(_definition, string.Format("Login failed: No captcha input found using {0}", captcha.Input));
|
||||
throw new CardigannConfigException(_definition, $"Login failed: No captcha input found using {captcha.Input}");
|
||||
}
|
||||
|
||||
input = inputElement.GetAttribute("name");
|
||||
|
|
|
|||
Loading…
Reference in a new issue