hdtorrents: add check if login is needed

Fixes #14891
This commit is contained in:
Bogdan 2023-12-08 20:31:16 +02:00
parent 5e2aa247bb
commit 69ba8c47f4
1 changed files with 7 additions and 0 deletions

View File

@ -164,6 +164,13 @@ namespace Jackett.Common.Indexers
var results = await RequestWithCookiesAndRetryAsync(searchUrl);
// Occasionally the cookies become invalid, login again if that happens
if (results.ContentString.Contains("Error:You're not authorized"))
{
await ApplyConfiguration(null);
results = await RequestWithCookiesAndRetryAsync(searchUrl);
}
try
{
var parser = new HtmlParser();