mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
tvvault: fix login error message (#9021)
This commit is contained in:
@@ -17,6 +17,8 @@ using NLog;
|
|||||||
|
|
||||||
namespace Jackett.Common.Indexers
|
namespace Jackett.Common.Indexers
|
||||||
{
|
{
|
||||||
|
// This tracker is based on GazelleTracker but we can't use the API/abstract because there are some
|
||||||
|
// missing features. https://github.com/Jackett/Jackett/issues/8508
|
||||||
[ExcludeFromCodeCoverage]
|
[ExcludeFromCodeCoverage]
|
||||||
public class TVVault : BaseWebIndexer
|
public class TVVault : BaseWebIndexer
|
||||||
{
|
{
|
||||||
@@ -62,8 +64,13 @@ namespace Jackett.Common.Indexers
|
|||||||
};
|
};
|
||||||
|
|
||||||
var result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, null, true, null, LoginUrl, true);
|
var result = await RequestLoginAndFollowRedirect(LoginUrl, pairs, null, true, null, LoginUrl, true);
|
||||||
await ConfigureIfOK(result.Cookies, result.Content?.Contains("logout.php") == true,
|
await ConfigureIfOK(result.Cookies, result.Content?.Contains("logout.php") == true, () =>
|
||||||
() => throw new ExceptionWithConfigData(result.Content, configData));
|
{
|
||||||
|
var parser = new HtmlParser();
|
||||||
|
var dom = parser.ParseDocument(result.Content);
|
||||||
|
var errorMessage = dom.QuerySelector("form#loginform").TextContent.Trim();
|
||||||
|
throw new ExceptionWithConfigData(errorMessage, configData);
|
||||||
|
});
|
||||||
return IndexerConfigurationStatus.RequiresTesting;
|
return IndexerConfigurationStatus.RequiresTesting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user