TorrentDay: improve cookie handling

This commit is contained in:
kaso17 2018-09-03 15:32:16 +02:00
parent 852bb27de0
commit 88858022af
1 changed files with 4 additions and 2 deletions

View File

@ -54,7 +54,7 @@ namespace Jackett.Common.Indexers
client: wc,
logger: l,
p: ps,
configData: new ConfigurationDataRecaptchaLogin())
configData: new ConfigurationDataRecaptchaLogin("Make sure you get the cookies from the same torrent day domain as configured above."))
{
wc.EmulateBrowser = false;
Encoding = Encoding.UTF8;
@ -121,7 +121,9 @@ namespace Jackett.Common.Indexers
loginPage = await RequestStringWithCookies(loginPage.RedirectingTo, string.Empty);
CQ cq = loginPage.Content;
var result = this.configData;
result.CookieHeader.Value = loginPage.Cookies;
//result.CookieHeader.Value = loginPage.Cookies;
UpdateCookieHeader(loginPage.Cookies); // update cookies instead of replacing them, see #3717
result.Captcha.SiteKey = cq.Find(".g-recaptcha").Attr("data-sitekey");
result.Captcha.Version = "2";
return result;