Open githubtrip opened 3 years ago
@githubtrip Do this for chromedriver.
` chrome_prefs = {}
chrome_prefs["profile.default_content_settings"] = {"images": 2}
chrome_prefs["profile.managed_default_content_settings"] = {"images": 2}
options.add_experimental_option('prefs', chrome_prefs) `
@githubtrip Do this for chromedriver.
` chrome_prefs = {}
chrome_prefs["profile.default_content_settings"] = {"images": 2}
chrome_prefs["profile.managed_default_content_settings"] = {"images": 2}
options.add_experimental_option('prefs', chrome_prefs) `
it is just for chromedriver.but no works with undetected-chromedriver.
@go8go It works bro. undetected-chromedriver is a wrapper over selenium with added functionalities for preventing bot detection and everything that's possible on selenium is possible on undetected-chromedriver.
@go8go It works bro. undetected-chromedriver is a wrapper over selenium with added functionalities for preventing bot detection and everything that's possible on selenium is possible on undetected-chromedriver.
but for v2 no works..can you make me some help?
below is my code:
import undetected_chromedriver.v2 as options = uc.ChromeOptions() chrome_prefs = {} chrome_prefs["profile.default_content_settings"] = {"images": 2} chrome_prefs["profile.managed_default_content_settings"] = {"images": 2} options.add_experimental_option('prefs', chrome_prefs) driver = uc.Chrome(options=options) driver.get('https://www.dofus-touch.com/') # known url using cloudflare's "under attack mode" input()
error is :
selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: cannot parse capability: goog:chromeOptions from invalid argument: unrecognized chrome option: prefs
i got this same error, anyone has a good solution?
Same error here with v2
same error . Is there a solution?
Still nothing ?
think someone already solved it else where, check around, remember that i saw it somewhere.
@Zorral Can you please share a link if you could find out where you saw the solution.
Mhm, I dont think I was able to find it but I was able to find this within my code: options.add_argument('--blink-settings=imagesEnabled=false')
Feel free to take credit if you were the one who discovered this! As I could not find who posted it first.
Thanks @Zorral. This works.
How to disable image loads to save bandwidth? Good residential proxies are expensive so want to know if its possible to disable loading of images