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:
Garfield69 2019-05-17 14:23:18 +12:00
parent c33f0594bd
commit 87a36e3621
1 changed files with 2 additions and 1 deletions

View File

@ -788,8 +788,9 @@ namespace Jackett.Common.Indexers
var hasCaptcha = false;
var CloudFlareCaptchaChallenge = landingResultDocument.QuerySelector("script[src*=\"/recaptcha/api.js\"]");
var grecaptcha = landingResultDocument.QuerySelector(".g-recaptcha");
if (grecaptcha != null)
if (CloudFlareCaptchaChallenge != null && grecaptcha != null)
{
hasCaptcha = true;
var CaptchaItem = new RecaptchaItem();