Lesson one project

I use duckduckgi image search nto serch image but when i want save my images it take so long in other words just it busy my computer and does not work. do you have any idea?

Code for image search is:
urls_sun= DDGS().images(
keywords=‘sun photo’,
region=“wt-wt”,
safesearch=“off”,
size=None,
color=“Monochrome”,
type_image=None,
layout=None,
license_image=None,
max_results=1000,
)

cods for save the images are:

names= ‘sun’, ‘earth’
path= Path(‘forest_or_earth’)
from time import sleep

for o in names:
dest= (path/o)
dest.mkdir(exist_ok=True, parents=True) # we build a folder for forest and a folder for earth
download_images(dest, urls= urls_shade ) # we save pictures in dest directory
#sleep(10)
download_images(dest, urls= urls_sun)
#sleep(10)
resize_images(path/o, max_size=400, dest=path/o)