Fixed too strong captcha detection
This commit is contained in:
+6
-17
@@ -1,19 +1,8 @@
|
||||
DATE | TIME | WEBSITE | REASON
|
||||
----------------------------------------------------------------------------------------------------
|
||||
14/02/2026 | 20:31:58 | Site_3 (https://kulalaland.com/) | No email field detected
|
||||
14/02/2026 | 20:42:16 | Dutch News Test (https://www.dut | CAPTCHA present: reCAPTCHA
|
||||
14/02/2026 | 20:43:17 | Site_1 (https://www.dutchnews.nl | CAPTCHA present: reCAPTCHA
|
||||
14/02/2026 | 20:43:17 | Site_3 (https://kulalaland.com/) | No email field detected
|
||||
14/02/2026 | 20:45:19 | Site_1 (https://www.dutchnews.nl | CAPTCHA present: reCAPTCHA
|
||||
14/02/2026 | 20:45:19 | Site_2 (https://immaculatevegan. | Not a newsletter signup form
|
||||
14/02/2026 | 20:45:19 | Site_3 (https://kulalaland.com/) | No email field detected
|
||||
14/02/2026 | 20:46:06 | Site_1 (https://www.dutchnews.nl | CAPTCHA present: reCAPTCHA
|
||||
14/02/2026 | 20:46:06 | Site_3 (https://kulalaland.com/) | No email field detected
|
||||
14/02/2026 | 21:26:47 | Dutch News Test (https://www.dut | Navigating frame was detached
|
||||
14/02/2026 | 21:26:47 | Immaculate Vegan (https://immacu | Connection closed.
|
||||
14/02/2026 | 21:26:47 | Gate6 (https://gate6.vn/) | Connection closed.
|
||||
14/02/2026 | 21:26:47 | Kulala Land (https://kulalaland. | Connection closed.
|
||||
14/02/2026 | 21:26:47 | sneakywholefoods (https://www.sn | Connection closed.
|
||||
14/02/2026 | 21:27:40 | Dutch News Test (https://www.dut | CAPTCHA present: reCAPTCHA
|
||||
14/02/2026 | 21:27:40 | Kulala Land (https://kulalaland. | No email field detected
|
||||
14/02/2026 | 21:27:40 | sneakywholefoods (https://www.sn | Not a newsletter signup form
|
||||
14/02/2026 | 22:41:09 | Dutch News Test (https://www.dut | CAPTCHA present: reCAPTCHA
|
||||
14/02/2026 | 22:41:09 | Kulala Land (https://kulalaland. | No email field detected
|
||||
14/02/2026 | 22:41:09 | sneakywholefoods (https://www.sn | Not a newsletter signup form
|
||||
14/02/2026 | 22:46:37 | Gate6 (https://gate6.vn/) | Navigating frame was detached
|
||||
14/02/2026 | 22:46:37 | Kulala Land (https://kulalaland. | Navigating frame was detached
|
||||
14/02/2026 | 22:46:37 | sneakywholefoods (https://www.sn | Connection closed.
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# Newsletter signup sites
|
||||
# Lines starting with # are ignored
|
||||
|
||||
https://www.dutchnews.nl/dutchnews-newsletter-signup/
|
||||
https://immaculatevegan.com/blogs/magazine
|
||||
https://kulalaland.com/
|
||||
+17
-6
@@ -31,12 +31,23 @@ async function detectCaptcha(page) {
|
||||
for (const selector of config.selectors) {
|
||||
const elements = document.querySelectorAll(selector);
|
||||
if (elements.length > 0) {
|
||||
results.push({
|
||||
type: type,
|
||||
name: config.name,
|
||||
selector: selector,
|
||||
count: elements.length
|
||||
});
|
||||
for (const el of elements) {
|
||||
const style = window.getComputedStyle(el);
|
||||
const rect = el.getBoundingClientRect();
|
||||
const isVisible = style.display !== 'none' &&
|
||||
style.visibility !== 'hidden' &&
|
||||
style.opacity !== '0' &&
|
||||
rect.width > 0 &&
|
||||
rect.height > 0;
|
||||
|
||||
results.push({
|
||||
type: type,
|
||||
name: config.name,
|
||||
selector: selector,
|
||||
count: elements.length,
|
||||
isVisible: isVisible
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-4
@@ -37,7 +37,8 @@ async function processSite(browser, site, globalCreds, browserConfig, keepOpen =
|
||||
if (captchaInfo.length > 0) {
|
||||
console.log(`\n CAPTCHA DETECTED:`);
|
||||
for (const captcha of captchaInfo) {
|
||||
console.log(` - ${captcha.name}`);
|
||||
const visibility = captcha.isVisible ? '(visible)' : '(hidden)';
|
||||
console.log(` - ${captcha.name} ${visibility}`);
|
||||
}
|
||||
|
||||
if (captchaInfo.some(c => c.type === 'mathCaptcha')) {
|
||||
@@ -77,11 +78,14 @@ async function processSite(browser, site, globalCreds, browserConfig, keepOpen =
|
||||
}
|
||||
}
|
||||
|
||||
if (captchaInfo.some(c => c.type === 'recaptcha' || c.type === 'hcaptcha')) {
|
||||
const visibleRecaptcha = captchaInfo.filter(c => (c.type === 'recaptcha' || c.type === 'hcaptcha') && c.isVisible);
|
||||
if (visibleRecaptcha.length > 0) {
|
||||
siteFailed = true;
|
||||
failureReason = `CAPTCHA present: ${captchaInfo.map(c => c.name).join(', ')}`;
|
||||
console.error(` Cannot auto-solve ${captchaInfo.map(c => c.name).join(', ')}`);
|
||||
failureReason = `CAPTCHA present: ${visibleRecaptcha.map(c => c.name).join(', ')}`;
|
||||
console.error(` Cannot auto-solve ${visibleRecaptcha.map(c => c.name).join(', ')}`);
|
||||
return { siteFailed, failureReason, page };
|
||||
} else if (captchaInfo.some(c => c.type === 'recaptcha' || c.type === 'hcaptcha')) {
|
||||
console.log(` CAPTCHA detected but not visible - attempting to proceed anyway`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user