Closed WTFWITHTHISNAMESHIT closed 8 months ago
Hello and thank you for your interest in this project!
You can pick the specific browser version to generate with the browserListQuery
parameter in the getHeaders
method.
const { HeaderGenerator } = require('header-generator');
const headerGenerator = new HeaderGenerator();
headerGenerator.getHeaders({
browserListQuery: 'Chrome < 119',
});
This example generates headers for Chrome with a lower version than 119
. Note that if the condition cannot be met (e.g. you asked for Chrome < 60
), the generator ignores the query and generates a random header instead. All the generated headers are based on recent real-life data from our fingerprint database - and since nobody uses Chrome < 60 anymore, our tools don't generate its headers.
The browserListQuery
parameter can be used in the fingerprint generator (or injector) as well - consult your favourite code completion tool :)
I'll close this issue now, but feel free to ask additional questions if you have any. Cheers!
when I Use
const context = await fingerprint.newInjectedContext( browser, { // Constraints for the generated fingerprint (optional) fingerprintOptions: { }, newContextOptions: { } }, );
andlet userAgent = await page.evaluate("navigator.userAgent"); common.log(userAgent)
the result always Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 or Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 whydid I miss sth , need more random fingerprint to bypass fingerControl