diff --git a/src/Jackett/Indexers/x264.cs b/src/Jackett/Indexers/x264.cs index fc70a8548..c2648f131 100644 --- a/src/Jackett/Indexers/x264.cs +++ b/src/Jackett/Indexers/x264.cs @@ -56,13 +56,12 @@ namespace Jackett.Indexers { var loginPage = await RequestStringWithCookies(LoginUrl, string.Empty); CQ dom = loginPage.Content; - CQ recaptchaScript = dom.Find("script").First(); - string recaptchaSiteKey = recaptchaScript.Attr("src").Split('=')[1]; var result = this.configData; + var captcha = dom.Find(".g-recaptcha"); result.CookieHeader.Value = loginPage.Cookies; - result.Captcha.SiteKey = recaptchaSiteKey; - result.Captcha.Version = "1"; + result.Captcha.SiteKey = captcha.Attr("data-sitekey"); + result.Captcha.Version = "2"; return result; } @@ -72,8 +71,7 @@ namespace Jackett.Indexers var pairs = new Dictionary { { "username", configData.Username.Value }, { "password", configData.Password.Value }, - { "recaptcha_challenge_field", configData.Captcha.Challenge }, - { "recaptcha_response_field", configData.Captcha.Value }, + { "g-recaptcha-response", configData.Captcha.Value } }; if (!string.IsNullOrWhiteSpace(configData.Captcha.Cookie))