mirror of
https://github.com/Jackett/Jackett
synced 2025-03-10 14:14:25 +00:00
tvvault: fix login error message (#9021)
This commit is contained in:
parent
878aa1aab9
commit
e9c8c95d96
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue