selenium+webdriver
from selenium.common.exceptions import TimeoutException from
selenium.webdriver.common.by import By from selenium.webdriver.support
import expected_conditions as EC from selenium.webdriver.support.wait
import WebDriverWait from selenium.webdriver.common.keys import Keys
代理设置
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument("–proxy-server=http://127.0.0.1:1080")
无界面设置
chromeOptions = webdriver.ChromeOptions()
chromeOptions.add_argument(’–headless’)browser = webdriver.Chrome(chrome_options=chromeOptions)