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.
Selenium Chromedriver navigiert bei Verwendung eines benutzerdefinierten Benutzerdatenverzeichnisses nicht zu einer URL ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post