Cardigann: support relative submit urls

This commit is contained in:
kaso17 2017-03-01 17:29:20 +01:00
parent 225feff73f
commit f997d27867
1 changed files with 2 additions and 2 deletions

View File

@ -630,7 +630,7 @@ namespace Jackett.Indexers
}
if (queryCollection.Count > 0)
submitUrlstr += "?" + queryCollection.GetQueryString();
var submitUrl = resolvePath(submitUrlstr);
var submitUrl = resolvePath(submitUrlstr, new Uri(LoginUrl));
// automatically solve simpleCaptchas, if used
var simpleCaptchaPresent = landingResultDocument.QuerySelector("script[src*=\"simpleCaptcha\"]");
@ -692,7 +692,7 @@ namespace Jackett.Indexers
var body = string.Join("\r\n", bodyParts);
loginResult = await PostDataWithCookies(submitUrl.ToString(), pairs, configData.CookieHeader.Value, SiteLink, headers, body);
} else {
loginResult = await RequestLoginAndFollowRedirect(submitUrl.ToString(), pairs, configData.CookieHeader.Value, true, null, SiteLink, true);
loginResult = await RequestLoginAndFollowRedirect(submitUrl.ToString(), pairs, configData.CookieHeader.Value, true, null, LoginUrl, true);
}
configData.CookieHeader.Value = loginResult.Cookies;