cheshirecaat / browser-with-fingerprints Goto Github PK
View Code? Open in Web Editor NEWAnonymous automation with fingerprint replacement technology.
License: MIT License
Anonymous automation with fingerprint replacement technology.
License: MIT License
I don't want to use the default one it gets from an IP.
This doesn't help:
plugin.useProxy('', {
changeGeolocation: false,
});
in normally playwright chromium opens in just 1-2 seconds. but with your fingerprint system. it takes 10-20 seconds.
When trying to launch multiple instances (nodejs files) I get
Error: Lock is not acquired/owned by you at C:\Users\username\Desktop\foldername\node_modules\proper-lockfile\lib\lockfile.js:285:43 at LOOP (node:fs:2701:14) at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { code: 'ENOTACQUIRED' }
any idea why?
It occurs when:
I believe that the port is hardcoded in this line of code:
Is there any way to select a random port for each start to avoid these errors?
Note that I have used https://github.com/CheshireCaat/selenium-with-fingerprints.
Even when saving the fingerprint, each launch of the browser takes a long time.
how can this be fixed? Is it possible to add caching?
thank you for making me close this ticket because there is no support available whatsoever! gj bablo!
Извиняюсь, если я должен был задать этот вопрос в другом месте.
Я очень люблю эту библиотеку, но мне также очень нравится многофункциональная среда, такая как общий языковой среды выполнения (CLR) и C#.
Меня интересует, возможно ли мне портировать следующие библиотеки на C#:
browser-with-fingerprints
playwright-with-fingerprints
Или это невозможно из-за необходимости портировать дополнительный код?
Буду признателен за вашу помощь и ответ на этот вопрос.
The code executes just fine when launching the first instance, the error seems to occur with subsequent instances, and also does not happen 100% of the time but appears to occur in the majority of cases. When I comment out the setWorkingFolder line or the userDataDir one, the code executes without this error.
Error: Failed to launch the browser process!
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at Interface.onClose (C:\Users\Administrator\Desktop\test-bot\node_modules\@puppeteer\browsers\lib\cjs\launch.js:262:24)
at Interface.emit (node:events:525:35)
at Interface.close (node:internal/readline/interface:533:10)
at Socket.onend (node:internal/readline/interface:259:10)
at Socket.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
import path from 'path';
import PQueue from 'p-queue';
import { plugin } from 'puppeteer-with-fingerprints';
const queue = new PQueue({ concurrency: 5 });
const launchQueue = new PQueue({ concurrency: 1 });
async function launchPuppeteer(instanceId) {
plugin.setWorkingFolder(`./engines/instance_${instanceId}`);
const fingerprint = await plugin.fetch('', {
tags: ['Microsoft Windows', 'Chrome'],
});
plugin.useFingerprint(fingerprint);
const browser = await plugin.launch({
headless: false,
userDataDir: path.resolve(`./sessions/${instanceId}`),
});
const page = await browser.newPage();
return { browser, page };
}
(async () => {
const instancesIds = ['1', '2', '3', '4', '5'];
instancesIds.forEach((instancesId) => {
queue.add(async () => {
const { browser, page } = await launchQueue.add(() => launchPuppeteer(instancesId));
await page.goto('https://browserleaks.com/');
await new Promise((resolve) => browser.on('disconnected', resolve));
});
});
})();
In Playwright docs I found that it does not support Socks5 with authorization.
microsoft/playwright#2425 (comment)
But in your examples you show one: https://github.com/CheshireCaat/browser-with-fingerprints#proxy-usage
Is your plugin adds support of proxy5 with authentication?
I was searching for a way to override width and height, I know that it's a way to improve fingerpriting but I really need to override that
\node_modules\bas-remote-node\src\services\engine.js:114
throw new Error(Unable to start engine process (code: ${error.code})\n${INVALID_ENGINE_ERROR}
);
^
Error: Unable to start engine process (code: 3221225781)
This could be due to the fact that the engine was not downloaded or unpacked correctly.
Try completely deleting the engine folder and restarting the code until it completes.
If this does not help, open an issue with a detailed description of the problem.
Script runs few browsers in parallel. Script occasionally stucks forever in synchronous call mutex.create(BASProcess${pid}
); I am sure about this point because of added debug message right before and after. It looks like deadlock with mutex. It usually happens after an hours of running. I suspect that issue won't be investigated in any close future due missing code to reproduce issue. So I wonder
Update:
Looks that mutex is created and locked but seemed never released until script is stopped. Windows re-uses same process IDs. And long running script(s) will stuck trying to acquire mutex with re-used PID sooner or later. Multiple scripts affect each other also even if they use different workingFolders/instances because use same mutex namespace.
So proper solution should be to release mutex.
All window seems zoomed 2 times (not a website, the browser too).
The console says "Unable to set correct viewport size." not sure if its related because not only website is zoomed.
Even when saving the fingerprint, each launch of the browser takes a long time 30s
Hey,
Any idea on how I can make a browser to launch faster? it takes about 40 seconds
fingerprint = await readFile(
./fingerprints/${await getRandomFileNameFromFolder('./fingerprints')}
, 'utf8')
await plugin.useFingerprint(fingerprint);
await plugin.useProxy(${ip}:${port}@${username}:${password}
, {
detectExternalIP: true,
changeGeolocation: true,
changeBrowserLanguage: true,
changeTimezone: true,
changeWebRTC: true,
});
console.log('Proxy Loaded')
browser = await plugin.launch({
headless: true,
args: [--profile-directory=${chromeProfile}
],
userDataDir: path.join(process.env.LOCALAPPDATA, 'Google', 'Chrome',User Data${instanceNumber}
)
});
For now, we have to use cluster
or worker_threads
to use multiple browser with different FINGERPRINT_CWD
.
I think, that it will be easiest to use some argument to control the workingDir
so we will be able to use multiple browsers with different FINGERPRINT_CWD
in one NodeJS script so the RAM usage will be less.
I don't know if this is possible but I initially checked and there should be no problems.
Of course, FINGERPRINT_CWD
may still be supported.
Can you please update the documentation for browser-with-fingerprints
to include more information on how the plugin works during the first launch and subsequent launches?
It would be great if you could add a new section called "Technical Details" after the Architecture section that explains the following:
browser-with-fingerprints
, the plugin will download the necessary dependencies to the FINGERPRINT_CWD
folder via the independent bas-remote-node
project.browser-with-fingerprints
that is being used, as well as the specific browser being used to run your script.FingerprintPlugin
has been updated. In this case, the plugin will download and update its dependencies as needed.FINGERPRINT_CWD
folder should not be deleted between script runs, as this could result in the need to redownload dependencies and slow down execution time.FINGERPRINT_CWD
folder because each copy of your script can update dependencies at the same time and it may break the functionality of your script.Of course, I provided just an example because I do not completely understand how it works. It would be great if you could provide more detailed information on this topic.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.