-
Hi, I've written code which monkey patch of some browser props, website that I try to scrap takes browser fingerprint with canvas data url etc. I was able to patch it with this code:
It works fine in IDE, although I get detected in docker container, docker container works when I use cdp mode, it's not being detected although I can't spoof all of those properties with cdp mode as it uses driver. Is there any cdp mode way of monkey patching those properties before website is being loaded? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
There are fingerprints that you can change in CDP Mode, such as timezone and geolocation. Example: Docker leaves hardcoded fingerprints that can't be changed, so I wouldn't use that if you need stealth. |
Beta Was this translation helpful? Give feedback.
-
my problem is canvas fingerprint which is being sent as payload. What I'm trying to do is to override headers and payload with on paused event but I can't make it work, looks like script is stale after log print("New body preview:", preview):
|
Beta Was this translation helpful? Give feedback.
There are fingerprints that you can change in CDP Mode, such as timezone and geolocation. Example:
https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_timezone_sb.py
Docker leaves hardcoded fingerprints that can't be changed, so I wouldn't use that if you need stealth.