따라하고 있는데 크롬웹드라이버의 버전이 많이 바뀌어서 그런지
크롬창이 자꾸 닫히는 현상이 있었습니다. 포기하려고 하다가 검색해서 해결안을 찾았습니다.
내용은 저도 잘 모릅니다. 그냥 이제는 창이 안 닫힌다는거.. 참고하시기 바랍니다.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
import time
chrome_options = Options()
chrome_options.add_experimental_option("detach", True)
driver = webdriver.Chrome(options=chrome_options)
driver.get('https://instagram.com')