mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: (Cardigann) Don't try re-auth if can't html parse json
This commit is contained in:
@@ -924,15 +924,19 @@ namespace NzbDrone.Core.Indexers.Cardigann
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var parser = new HtmlParser();
|
// Only run html test selector on html responses
|
||||||
var document = parser.ParseDocument(response.Content);
|
if (response.Headers.ContentType.Contains("text/html"))
|
||||||
|
|
||||||
if (_definition.Login.Test.Selector != null)
|
|
||||||
{
|
{
|
||||||
var selection = document.QuerySelectorAll(_definition.Login.Test.Selector);
|
var parser = new HtmlParser();
|
||||||
if (selection.Length == 0)
|
var document = parser.ParseDocument(response.Content);
|
||||||
|
|
||||||
|
if (_definition.Login.Test.Selector != null)
|
||||||
{
|
{
|
||||||
return true;
|
var selection = document.QuerySelectorAll(_definition.Login.Test.Selector);
|
||||||
|
if (selection.Length == 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user