mirror of https://github.com/Jackett/Jackett
parent
23e7c9d76a
commit
efc7f5659d
|
@ -14,7 +14,6 @@ using Jackett.Common.Services.Interfaces;
|
|||
using Jackett.Common.Utils.Clients;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using WebRequest = Jackett.Common.Utils.Clients.WebRequest;
|
||||
|
||||
namespace Jackett.Common.Indexers
|
||||
{
|
||||
|
@ -81,6 +80,12 @@ namespace Jackett.Common.Indexers
|
|||
{ "returnto", "/index.php" }
|
||||
};
|
||||
|
||||
var parser = new HtmlParser();
|
||||
var dom = parser.ParseDocument(loginForm.ContentString);
|
||||
var loginKey = dom.QuerySelector("input[name=\"loginKey\"]");
|
||||
if (loginKey !=null )
|
||||
pairs["loginKey"] = loginKey.GetAttribute("value");
|
||||
|
||||
var response = await RequestLoginAndFollowRedirect(LoginUrl, pairs, loginForm.Cookies, true, null, SiteLink);
|
||||
var responseContent = response.ContentString;
|
||||
await ConfigureIfOK(response.Cookies, responseContent.Contains(LogoutStr), () =>
|
||||
|
|
Loading…
Reference in New Issue