Inquire the webdriver.get function in Python Selenium (login to Naver and crawl)

Asked 2 years ago, Updated 2 years ago, 84 views

It works normally from the code below to the login, but the last get function is not executed and ends. But that doesn't mean there's an error message. What's the reason?

drv.get("https://nid.naver.com/nidlogin.login")
drv.execute_script ("document.getElementsByName('id')[0].value=\'" + 'ID' + "\'")
drv.execute_script ("document.getElementsByName('pw')[0].value=\'" + 'password' + "\'")
drv.find_element_by_class_name('btn_global').click()
drv.get("https://blog.naver.com/ My Blog ID")

time.Insert sleep (5) over get and you'll see a normal blog.

However, if you set it to driver.implicitly_wait(5), the get function is not executed, and the program is just terminated.

I think it's because the content of the site hasn't been completely downloaded yet.

Time when using the get function in the code to solve this problem.Do I have to use sleep?

python selenium-webdrive

2022-09-22 08:32

1 Answers

I think the document below will be helpful.

https://www.seleniumeasy.com/selenium-tutorials/synchronization-in-selenium-webdriver


2022-09-22 08:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.