Fixed: (ExecuteAuth) Request timeout of 15s by default, if not set otherwise

This commit is contained in:
Bogdan
2023-02-03 15:58:17 +02:00
parent 529fbfd9bd
commit dbf86efb0a
23 changed files with 187 additions and 360 deletions
@@ -59,7 +59,6 @@ public class XSpeeds : TorrentIndexerBase<UserPassTorrentBaseSettings>
AllowAutoRedirect = true,
Method = HttpMethod.Post
};
requestBuilder.PostProcess += r => r.RequestTimeout = TimeSpan.FromSeconds(15);
var authLoginRequest = requestBuilder
.SetCookies(landingPage.GetCookies())
@@ -81,7 +80,7 @@ public class XSpeeds : TorrentIndexerBase<UserPassTorrentBaseSettings>
errorMessage = dom.QuerySelector("div.notification-body")?.TextContent.Trim().Replace("\n\t", " ");
}
throw new IndexerAuthException(errorMessage);
throw new IndexerAuthException(errorMessage ?? "Unknown error message, please report.");
}
var cookies = response.GetCookies();