selenium chromedriver

selenium安装:https://pypi.org/project/selenium/#files

chromedriver国内镜像地址:https://npm.taobao.org/mirrors/chromedriver

chromedriver配置:

import os
from selenium import webdriver
chromedriver = "/Volumes/酒/soft/ChromeDriver"
os.environ["webdriver.chrome.driver"] = chromedriver
browser=webdriver.Chrome(chromedriver)

browser.get(url)

input = browser.find_element_by_class_name('classname')
src = input.get_attribute("src")

你可能感兴趣的:(python,配置杂类)