Skip to content

Commit 4282e17

Browse files
authored
fix: #8 - [Website Checker Runner Puppeteer] Improve recaptcha detection (#12)
1 parent 4600159 commit 4282e17

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

checker-cheerio/src/checkers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function distilCaptcha($: CheerioAPI): boolean {
77

88
export function recaptcha($: CheerioAPI): boolean {
99
return $('#recaptcha').length > 0
10-
|| $('iframe[src*="/recaptcha/"]').length > 0;
10+
|| $('iframe[src*="/recaptcha/"]:not([width="0"][height="0"])').length > 0;
1111
}
1212

1313
export function hCaptcha($: CheerioAPI): boolean {

checker-playwright/src/checkers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function distilCaptcha($: CheerioAPI): boolean {
77

88
export function recaptcha($: CheerioAPI): boolean {
99
return $('#recaptcha').length > 0
10-
|| $('iframe[src*="/recaptcha/"]').length > 0;
10+
|| $('iframe[src*="/recaptcha/"]:not([width="0"][height="0"])').length > 0;
1111
}
1212

1313
export function hCaptcha($: CheerioAPI): boolean {

checker-puppeteer/src/checkers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export function distilCaptcha($: CheerioAPI): boolean {
77

88
export function recaptcha($: CheerioAPI): boolean {
99
return $('#recaptcha').length > 0
10-
|| $('iframe[src*="/recaptcha/"]').length > 0;
10+
|| $('iframe[src*="/recaptcha/"]:not([width="0"][height="0"])').length > 0;
1111
}
1212

1313
export function hCaptcha($: CheerioAPI): boolean {
@@ -25,4 +25,4 @@ export function testHtml($: CheerioAPI) {
2525
recaptcha: recaptcha($),
2626
hCaptcha: hCaptcha($),
2727
};
28-
}
28+
}

0 commit comments

Comments
 (0)