最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - Why my profil is not loaded with Undetected Chrome Driver? - Stack Overflow

programmeradmin0浏览0评论

I am using code that I found on this website:

With this code, I should be able to open a chrome windows already connected to my google profile.

There is the last version of my code:

import undetected_chromedriver as uc
import time

options = uc.ChromeOptions()

driver = uc.Chrome(
    user_data_dir = "C:\\Users\\...\\Profile 1", version_main=133
    )

driver.get( '' ) 

time.sleep(10)

driver.quit()

I try many different ways and I am never logged in. I tried with only selenium and it work fine...

I am using code that I found on this website: https://github.com/ultrafunkamsterdam/undetected-chromedriver

With this code, I should be able to open a chrome windows already connected to my google profile.

There is the last version of my code:

import undetected_chromedriver as uc
import time

options = uc.ChromeOptions()

driver = uc.Chrome(
    user_data_dir = "C:\\Users\\...\\Profile 1", version_main=133
    )

driver.get( 'https://nowsecure.nl' ) 

time.sleep(10)

driver.quit()

I try many different ways and I am never logged in. I tried with only selenium and it work fine...

Share asked 10 hours ago Why_Life_Why_Life_ 1 New contributor Why_Life_ is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 1
  • It should load your chrome profile that you have provided. How are you making sure it hasn't loaded your profile? – Automator Commented 5 hours ago
Add a comment  | 

1 Answer 1

Reset to default 0

Try the following: 1- Set the Profile Name

options = uc.ChromeOptions()
options.add_argument("--profile-directory=Profile 1")

2- Use an Older Version of UC

undetected-chromedriver==3.4.6

3- Verify Profile Path manually

chrome.exe --user-data-dir="C:\Users\YourUser\AppData\Local\Google\Chrome\User Data" --profile-directory="Profile 1"
发布评论

评论列表(0)

  1. 暂无评论