Closed vpolonic closed 9 months ago
When I've checked last time, selenium leaves traces. Please use BAS instead, it doesn't have that problem
BAS does not allow many functionalities, for example I have not found anywhere how I can click on a button that has a phone number and extract that phone number
You can click by any css/xpath selector, coordinates, execute js and many more, that is enough to click anywhere and extract anything
Ah and also to click on elements found by image and text
I found a solution, and now it works!
It remains to find a solution for displaying the browser, which is launched together with the fingerprint at extremely high parameters. without the fingerprint it launches ok, together with the fingerprint it launches very big! Do you have any idea where these parameters can be changed? This does not work!!! console.log( 'Viewport:', await driver.executeScript(() => ({ deviceScaleFactor: window.devicePixelRatio, width: document.documentElement.clientWidth, height: document.documentElement.clientHeight, })) );
const { plugin } = require('selenium-with-fingerprints'); fs = require("fs")
const key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
(async () => {
let fingerprint = JSON.parse(fs.readFileSync('./fingerprint.json', 'utf8')); if(!fingerprint){ fingerprint = await plugin.fetch(key, { tags: ['Microsoft Windows', 'Chrome'], }); console.log('Fingerprint obtained:'); fs.writeFileSync('./fingerprint.json', JSON.stringify(fingerprint, null, 2) , 'utf-8'); } console.log('Fingerprint obtained:');
console.log("Fingerprint loaded") const driver = await plugin.useFingerprint(fingerprint).launch();
console.log("Driver inited")
await driver.get('https://hmaker.github.io/selenium-detector/');
//await driver.quit(); })();
Version Chromium: 119.0.6045.106
I check with:https://hmaker.github.io/selenium-detector/
I check with: fingerprint.com
selenium-with-fingerprints it is detected as bot everywhere!
Also if I set the option with Mobile: fingerprint = await plugin.fetch(key, { tags: ['Mobile', 'Chrome'], });
It opens with a hundred times larger zoom!