mirror of https://github.com/Jackett/Jackett
cardigannindexer: correclty identify when recaptcha is in use
some sites drop the script but leave the g-recaptcha div behind causing false positives on hascaptcha flag.
This commit is contained in:
parent
c33f0594bd
commit
87a36e3621
|
@ -788,8 +788,9 @@ namespace Jackett.Common.Indexers
|
||||||
|
|
||||||
var hasCaptcha = false;
|
var hasCaptcha = false;
|
||||||
|
|
||||||
|
var CloudFlareCaptchaChallenge = landingResultDocument.QuerySelector("script[src*=\"/recaptcha/api.js\"]");
|
||||||
var grecaptcha = landingResultDocument.QuerySelector(".g-recaptcha");
|
var grecaptcha = landingResultDocument.QuerySelector(".g-recaptcha");
|
||||||
if (grecaptcha != null)
|
if (CloudFlareCaptchaChallenge != null && grecaptcha != null)
|
||||||
{
|
{
|
||||||
hasCaptcha = true;
|
hasCaptcha = true;
|
||||||
var CaptchaItem = new RecaptchaItem();
|
var CaptchaItem = new RecaptchaItem();
|
||||||
|
|
Loading…
Reference in New Issue