mirror of https://github.com/Jackett/Jackett
immortalseed: improve login error message (#13887)
This commit is contained in:
parent
b8c5a00b97
commit
54fd12428c
|
@ -129,7 +129,13 @@ namespace Jackett.Common.Indexers
|
||||||
|
|
||||||
await ConfigureIfOK(response.Cookies, response.ContentString.Contains("logout.php"), () =>
|
await ConfigureIfOK(response.Cookies, response.ContentString.Contains("logout.php"), () =>
|
||||||
{
|
{
|
||||||
|
var parser = new HtmlParser();
|
||||||
|
var document = parser.ParseDocument(response.ContentString);
|
||||||
|
var messageEl = document.QuerySelector("#main table");
|
||||||
var errorMessage = response.ContentString;
|
var errorMessage = response.ContentString;
|
||||||
|
if (messageEl != null)
|
||||||
|
errorMessage = messageEl.TextContent.Trim();
|
||||||
|
|
||||||
throw new ExceptionWithConfigData(errorMessage, configData);
|
throw new ExceptionWithConfigData(errorMessage, configData);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue