Closed kianfotovat closed 1 month ago
Fixed with 1.4.11
In case anyone runs into this problem in the future:
In Browser.ts
, modify the browserListQuery: 'last 2 edge version'
line of the
const fingerPrintData = new FingerprintGenerator().getFingerprint({
devices: this.bot.isMobile ? ['mobile'] : ['desktop'],
operatingSystems: this.bot.isMobile ? ['android'] : ['windows'],
browsers: ['edge']
browserListQuery: 'last 2 edge version'
})
block so it reads browserListQuery: 'last 1 edge version'
instead. Based on my 10 seconds of reading the browserlist
documentation, I believe that should always return the latest version of Edge.
I've specifically made it the last 2 versions so it differentiates a bit more between versions, it's not uncommon to not be on the latest version of a browser. Once again don't think it matters all that much, but you can still save the fingerprint in case you want it to return the same one.
Saving the fingerprint means it wouldn't update when a new browser version is available though, correct? That's why I assumed that option wouldn't work for me.
And I agree, I don't think it matters that much, if at all. If Microsoft wants to ban script users, they can do much more than just sniff the user agent. I just wanted the information to be in this issue in the (unlikely) event it might be useful to someone in the future.
Thanks again for your work on this script :)
It indeed would not update the user agent, however would make all request consistent and maybe "less suspicious", although so far I've not really heard of anyone getting banned because of this script (maybe some using proxies/multi accounts) however that's always a extra risk factor.
The root of this issue is fingerprint-generator not using the correct versions so please feel free to close this if you think its irrelevant/doesn't belong here. Oh and also thanks for the awesome script!
The user agent provided by fingerprint-generator's getFingerprint() is showing 124.0.0.0 instead of 128.0.0.0 for the Chrome/Edge versions. I looked at fingerprint-generator's documentation which led me to try replacing
browsers: ['edge']
withbrowsers: [ { name: 'edge', minVersion: 128 } ]
but this gave me a user agent for a macOS device using Safari. I messed with it a bit more and found that 126 is the highest I could set theminVersion
before getting weird behavior.