mirror of https://github.com/Jackett/Jackett
TorrentDay: improve cookie handling
This commit is contained in:
parent
852bb27de0
commit
88858022af
|
@ -54,7 +54,7 @@ namespace Jackett.Common.Indexers
|
||||||
client: wc,
|
client: wc,
|
||||||
logger: l,
|
logger: l,
|
||||||
p: ps,
|
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;
|
wc.EmulateBrowser = false;
|
||||||
Encoding = Encoding.UTF8;
|
Encoding = Encoding.UTF8;
|
||||||
|
@ -121,7 +121,9 @@ namespace Jackett.Common.Indexers
|
||||||
loginPage = await RequestStringWithCookies(loginPage.RedirectingTo, string.Empty);
|
loginPage = await RequestStringWithCookies(loginPage.RedirectingTo, string.Empty);
|
||||||
CQ cq = loginPage.Content;
|
CQ cq = loginPage.Content;
|
||||||
var result = this.configData;
|
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.SiteKey = cq.Find(".g-recaptcha").Attr("data-sitekey");
|
||||||
result.Captcha.Version = "2";
|
result.Captcha.Version = "2";
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue