答えて

0

あなたが行く:

import urllib 
from selenium import webdriver 

driver = webdriver.Firefox() 
driver.get('https://www.python.org/') 

# get the image source 
img = driver.find_element_by_xpath('//img[@class="python-logo"]') 
src = img.get_attribute('src') 

# download the image 
urllib.urlretrieve(src, "python-logo.png") 

driver.close() 
関連する問題