mirror of https://github.com/Jackett/Jackett
x264: upgrade to recaptcha V2
This commit is contained in:
parent
f99e104755
commit
20b9b692f0
|
@ -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<string, string> {
|
||||
{ "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))
|
||||
|
|
Loading…
Reference in New Issue