New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

puppeteer-real-browser

Package Overview
Dependencies
Maintainers
0
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puppeteer-real-browser - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

34

lib/cjs/module/turnstile.js

@@ -7,25 +7,29 @@ const checkTurnstile = ({ page }) => {

const elements = await page.$$('[name="cf-turnstile-response"]');
if (elements.length <= 0) {
const coordinates = await page.evaluate(() => {
let coordinates = [];
document.querySelectorAll('div').forEach(item => {
try {
if (item.getAttribute('style').includes('padding') && item.getAttribute('style').includes('border') && item.getAttribute('style').includes('margin')) coordinates.push({ x: item.getBoundingClientRect().x, y: item.getBoundingClientRect().y, w: item.getBoundingClientRect().width, h: item.getBoundingClientRect().height })
} catch (err) { }
});
return coordinates
})
for (const item of coordinates) {
try {
let x = item.x + 30;
let y = item.y + item.h / 2;
await page.mouse.click(x, y);
} catch (err) { }
}
return resolve(true)
}
if (elements.length <= 0) return resolve(false);
for (const element of elements) {
try {
const parentElement = await element.evaluateHandle(el => el.parentElement);
const box = await parentElement.boundingBox();
let x = box.x + 30;
let y = box.y + box.height / 2;
await page.realCursor.moveTo({ x, y });
await page.mouse.click(x, y);
try {
x += 30
await page.realCursor.moveTo({ x, y });
await page.mouse.click(x, y);
} catch (err) { }
try {
x += 30
await page.realCursor.moveTo({ x, y });
await page.mouse.click(x, y);
} catch (err) { }
} catch (err) { }

@@ -32,0 +36,0 @@ }

{
"name": "puppeteer-real-browser",
"version": "1.3.5",
"version": "1.3.6",
"description": "This package is designed to bypass puppeteer's bot-detecting captchas such as Cloudflare. It acts like a real browser and can be managed with puppeteer.",

@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc