mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Cardigann: add support for GET login
This commit is contained in:
@@ -525,6 +525,22 @@ namespace Jackett.Indexers
|
|||||||
{
|
{
|
||||||
configData.CookieHeader.Value = ((StringItem)configData.GetDynamic("cookie")).Value;
|
configData.CookieHeader.Value = ((StringItem)configData.GetDynamic("cookie")).Value;
|
||||||
}
|
}
|
||||||
|
else if (Login.Method == "get")
|
||||||
|
{
|
||||||
|
var queryCollection = new NameValueCollection();
|
||||||
|
foreach (var Input in Definition.Login.Inputs)
|
||||||
|
{
|
||||||
|
var value = applyGoTemplateText(Input.Value);
|
||||||
|
queryCollection.Add(Input.Key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
var LoginUrl = resolvePath(Login.Path + "?" + queryCollection.GetQueryString()).ToString();
|
||||||
|
configData.CookieHeader.Value = null;
|
||||||
|
var loginResult = await RequestStringWithCookies(LoginUrl, null, SiteLink);
|
||||||
|
configData.CookieHeader.Value = loginResult.Cookies;
|
||||||
|
|
||||||
|
checkForLoginError(loginResult);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new NotImplementedException("Login method " + Definition.Login.Method + " not implemented");
|
throw new NotImplementedException("Login method " + Definition.Login.Method + " not implemented");
|
||||||
|
Reference in New Issue
Block a user