Closed alimp5 closed 1 year ago
This error was introduced to prevent people fron accidentally stacking options, as it simply adds new ones if you call it again. The solution I found was to make a ChromeOptions list and call the indexes according to which options i wanted used. However still, each launch must have their own options index
Hi @lonewolf-github i'm thankful if you share an example. note: my options are as below and i don't want to change them for every launch.
self.chrome_options.add_argument("--no-first-run")
self.chrome_options.add_argument("--no-service-autorun")
self.chrome_options.add_argument("--password-store=basic")
self.chrome_options.add_argument("--no-default-browser-check")
self.chrome_options.add_argument("--window-size=1000,900")
sw_options = {}
if ":" in self.proxy_info:
sw_options = {
'proxy': {
'http': rf'http://{self.proxy_info}',
'https': rf'https://{self.proxy_info}',
}
}
Thanks..
Edited:
Oh yes...... you means i should to define a new line self.chrome_options = uc.ChromeOptions()
like self.driver =uc.Chrome(.......)
and then add my arguments? YES?
Try something like this:
options_list = []
#Launch 1
options[0] = uc.ChromeOptions()
options[0].add_argument("--user-data-dir=" + user_data_dir)
driver1 = uc.Chrome(options=options[0])
#Launch 2
options[1] = uc.ChromeOptions()
options[1].add_argument("--user-data-dir=" + user_data_dir)
driver2 = uc.Chrome(options=options[1])
Hi @lonewolf-github i'm thankful if you share an example. note: my options are as below and i don't want to change them for every launch.
self.chrome_options.add_argument("--no-first-run") self.chrome_options.add_argument("--no-service-autorun") self.chrome_options.add_argument("--password-store=basic") self.chrome_options.add_argument("--no-default-browser-check") self.chrome_options.add_argument("--window-size=1000,900") sw_options = {} if ":" in self.proxy_info: sw_options = { 'proxy': { 'http': rf'http://{self.proxy_info}', 'https': rf'https://{self.proxy_info}', } }
Thanks..
Edited: Oh yes...... you means i should to define a new line
self.chrome_options = uc.ChromeOptions()
likeself.driver =uc.Chrome(.......)
and then add my arguments? YES?
Hi, I’m just curious that what’s the purpose of your chrome options? Does that help you hide selenium?
This error was introduced to prevent people fron accidentally stacking options, as it simply adds new ones if you call it again. The solution I found was to make a ChromeOptions list and call the indexes according to which options i wanted used. However still, each launch must have their own options index
Would there be a way to bypass this? i got a script running that fetches links to perform a automated download once downloaded it shuts off the browser and then "repeats" the process
==UPDATE== i got rid of the options and after that it worked normally
Greetings! at first, i would thank you dear Leon for this python library. i don't know how i can to reuse and run the
user_data_directory
of a created chrome profile multiple times inundetected-chromedriver
!? when i want to reuse the created profile, i got erroryou cannot reuse the ChromeOptions object
. but i don't see this problem inselenium
orselenium-wire
. how to fix this issue? what's the solution ?. but when i useundetected-chromedriver
inselenium-wire
, i see error below.even i called the UC-Driver separately two times but failed: at line 50:
at line 60 again:
thanks a lot ;X
Error: