Passing fingerprint.com bot protection locally but not on Apify
The site I'm scraping uses fingerprint.com bot protection. Locally my code passes the protection 95% of the time, but when running the actor on Apify it never does. How is that possible?
To pass this protection I've implemented the following measures (complete code in next message), this was a bit of trial and error, so all feedback welcome:
- Browser Configuration
- Using Firefox instead of Chrome/Chromium
- Using incognito pages (useIncognitoPages: true)
- Enabled fingerprint randomization (useFingerprints: true)
- Random Viewport/Screen Properties
- Random window dimensions (1280-1920 x 720-1080)
- Random device scale factor (1, 1.25, 1.5, or 2)
- Random mobile/touch settings
- Random color scheme (light/dark)
- Locale and Timezone Randomization
- Random locale from 8 different options
- Random timezone from 8 different global locations
- Browser Property Spoofing
- Removing navigator.webdriver flag
- Random navigator.plugins array
- Random navigator.platform
- Random navigator.hardwareConcurrency (4-16)
- Random navigator.deviceMemory (2-16GB)
- Random navigator.languages
- Random navigator.maxTouchPoints
- Chrome Detection Evasion
- Removing Chrome DevTools Protocol (CDP) detection properties (cdcadoQpoasnfa76pfcZLmcfl*)
- Performance Timing Randomization
- Modifying performance.getEntries() to add random timing offsets
- Randomizing both startTime and duration of performance entries
- Proxy Usage
- Using residential proxies (groups: ['residential'])
4 Replies
View post on community site
This post has been pushed to the community knowledgebase. Any replies in this thread will be synced to the community site.
Apify Community
Dockerfile
Hello! Are you using a headless browser locally? Do you start the scraper with
apify run
? You could also try the RESIDENTIAL5
proxy tier, which works better but is more expensive.Thanks for having a look at this @Marco Yes, in both cases I used
apify run
and a headless browser. If I change to RESIDENTIAL5 proxies it no longer works locally, but with just RESIDENTIAL it does work locally. In neither case does it work on the Apify platform. If you want I can add you to the GitHub with the code if you want to have a look?
However, with another project RESIDENTIAL5 actually solved the bot protection, so thanks for that! I can however not find any documentation on this proxy type. Are there more?