mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-26 20:11:49 +02:00
Fixed: (RuTracker) Improve the error message for failed logins
This commit is contained in:
@@ -104,7 +104,11 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
|
|
||||||
if (!response.Content.Contains("id=\"logged-in-username\""))
|
if (!response.Content.Contains("id=\"logged-in-username\""))
|
||||||
{
|
{
|
||||||
throw new IndexerAuthException("RuTracker Auth Failed");
|
var parser = new HtmlParser();
|
||||||
|
var document = await parser.ParseDocumentAsync(response.Content);
|
||||||
|
var errorMessage = document.QuerySelector("h4.warnColor1.tCenter.mrg_16, div.msg-main")?.TextContent.Trim();
|
||||||
|
|
||||||
|
throw new IndexerAuthException(errorMessage ?? "RuTracker Auth Failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
cookies = response.GetCookies();
|
cookies = response.GetCookies();
|
||||||
|
Reference in New Issue
Block a user