undetected-chromedriver
undetected-chromedriver copied to clipboard
geolocation is per default enabled
so how can i fiix it plz ? knowing that add experimental option is not carried until proven otherwise by UC
options = uc.ChromeOptions()
prefs = {"profile.default_content_settings.geolocation": 2}
options.add_experimental_option("prefs", prefs)
options.add_argument("--deny-permission-prompts")
driver = uc.Chrome(options=options)
It's possible it doesn't works since there's a bug in the 'prefs' experimental options that doesn't properly merge nested keys when they're already defined in a profile, you need a recursive dictionary update for that instead of a flat dict.update()
In this case use my fork where this bug has been fixed but the relevant pull request has never been merged by the author on this repo.
Okay, how to install your fork with pip ?
@sebdelsol do you have any way to contact you about your fork ? cause we can't open issue.
pip install git+https://github.com/sebdelsol/undetected-chromedriver@master
You can now open an issue