ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
10.04k stars 1.16k forks source link

mobileEmulation #214

Open dimitrivisser opened 3 years ago

dimitrivisser commented 3 years ago

WIth the standard chromedriver I use mobileEmulation. I tried with undetected-chromedriver, but I cannot get it to work.

`import undetected_chromedriver.v2 as uc

mobile_emulation02 = { "deviceMetrics": { "width": 414, "height": 896, "pixelRatio": 2.0 }, "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A356 Safari/604.1" }

options = uc.ChromeOptions() options.add_argument('--no-first-run --no-service-autorun --password-store=basic')

options.add_experimental_option("mobileEmulation", mobile_emulation02)

driver = uc.Chrome(options=options)

location = 'https://bloommarketing.agency/'

with driver: driver.get(location) `

I get the error: "selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: mobileEmulation"

Am I doing something wrong? Or is this just not working with undetected-chromedriver and can I stop trying?

cf313995 commented 2 years ago

same problem

kaliiiiiiiiii commented 2 years ago

@cf313995 @dimitrivisser you can use Selenium_Profiles still in progress//working on btw