from selenium import webdriver as wb
from selenium.webdriver.common.by import By
import time
from selenium.webdriver.common.keys import Keys
import os
from urllib.request import urlretrieve
if not os.path.isdir("C:/Users/gjaischool/Desktop/dove") :
os.mkdir("C:/Users/gjaischool/Desktop/dove")
driver = wb.Chrome()
driver.get('https://search.naver.com/search.naver?sm=tab_hty.top&where=image&query=%EB%8B%A4%EB%9E%8C%EC%A5%90&oquery=%EC%B0%B8%EC%83%88&tqi=iffk5wp0J1Zss6d3M2wssssss9K-437096')
for i in range(10) :
body = driver.find_element(By.CSS_SELECTOR,"body")
body.send_keys(Keys.END)
img = driver.find_elements(By.CSS_SELECTOR,"._image._listImage")
img[0].get_attribute("src")
src = []
for i in range(len(img)) :
src.append(img[i].get_attribute("src"))
for i in range(len(src)) :
urlretrieve(src[i],"C:/Users/gjaischool/Desktop/dove/"+"dove"+str(i)+".jpg")