from selenium import webdriver from selenium.webdriver.chrome.options import Options from webdriver_manager.chrome import ChromeDriverManager """ selenium3, 4 """ options = Options() options.add_experimental_option('detach', True) # 부라우저 바로 닫힘 방지 options.add_experimental_option('excludeSwitches', ['enable-logging']) # 불필요한 메시지 제거 chrome_driver = ChromeDriverManager().install() print(chrome_driver) driver = webdriver.Chrome(chrome_driver, options=options) # 웹페이지 해당 주소 이동 driver.implicitly_wait(5) # 윂에지가 로딩 될때까지 5초는 기다림 driver.maximize_window() # 화면창 최대화 driver.get('https://nid.naver.com/nidlogin.login?mode=form&url=https%3A%2F%2Fwww.naver.com')
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter