有界面 耗内存,速度慢
#coding=utf-8
#导入select方法
from selenium import webdriver
# 有界面
# driver=webdriver.Chrome()
driver.get("https://www.amazon.com/dp/0062301675")
driver.quit()
无界面 节省内存,速度快
#coding=utf-8
#导入select方法
from selenium import webdriver
# 无界面
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("https://www.amazon.com/dp/0062301675")
driver.quit()