Selenium Chromedriver navigiert bei Verwendung eines benutzerdefinierten Benutzerdatenverzeichnisses nicht zu einer URL

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Selenium Chromedriver navigiert bei Verwendung eines benutzerdefinierten Benutzerdatenverzeichnisses nicht zu einer URL

by Guest » 16 Feb 2025, 11:17

Dies ist ein Code, in dem Selenium zum Krabbeln im Internet verwendet wurde, aber .get () scheint nicht zu funktionieren, nachdem Chrome und Chrome -Treiber aktualisiert wurden. "Und die Chrome -Treiberversion ist" 133.0.6943.98 ". < /p>
# No.1
# This code works.
driver = webdriver.Chrome()

url = "https://www.google.com"
driver.get(url)
< /code>
# No.2
# This code runs, but does not connect to the specified URL.
options = Options()
options.add_argument(r"USER_DATA_PATH") # "USER_DATA_PATH" is the path where the actual Chrome profile account is saved.

driver = webdriver.Chrome(options=options)

url = "https://www.google.com"
driver.get(url)
< /code>
There are some operations that can only be done using a Chrome profile account.
Is there anyone who is experiencing the same problem or knows a solution?
For tasks that do not require a Chrome profile account, the URL was accessed normally when the first code was used, and crawling was completed without any problems.
However, when the second code is executed, the Chrome instance and profile are loaded normally, but it does not go to the specified URL. No error message or error appeared when executing the code.
Code execution terminated normally.

Top