Cardigann: fix form login

This commit is contained in:
kaso17 2017-01-19 14:22:26 +01:00
parent 3d17b736c5
commit f96a493c08
1 changed files with 12 additions and 9 deletions

View File

@ -477,17 +477,20 @@ namespace Jackett.Indexers
}
// selector inputs
foreach (var Selectorinput in Login.Selectorinputs)
if (Login.Selectorinputs != null)
{
string value = null;
try
foreach (var Selectorinput in Login.Selectorinputs)
{
value = handleSelector(Selectorinput.Value, landingResultDocument.FirstElementChild);
pairs[Selectorinput.Key] = value;
}
catch (Exception ex)
{
throw new Exception(string.Format("Error while parsing selector input={0}, selector={1}, value={2}: {3}", Selectorinput.Key, Selectorinput.Value.Selector, value, ex.Message));
string value = null;
try
{
value = handleSelector(Selectorinput.Value, landingResultDocument.FirstElementChild);
pairs[Selectorinput.Key] = value;
}
catch (Exception ex)
{
throw new Exception(string.Format("Error while parsing selector input={0}, selector={1}, value={2}: {3}", Selectorinput.Key, Selectorinput.Value.Selector, value, ex.Message));
}
}
}