Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead
新版本的Selenium不再支持PhantomJS了,请使用Chrome或Firefox的无头版本来替代。
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("https://cnblogs.com/")