Selenium ile topluca resim indirememe hatası

Verdiğim kelimeyle Google resimlerdeki resimleri topluca indirmek istiyorum fakat başarısız oluyor, sadece 24 resim indiriyor sonra kapanıyor
Yardımcı olursanız sevinirim
https://paste.ubuntu.com/p/cXs9d4M4f2/

Kodlarınızı kod görünümünde buraya da aktarabilirsiniz.

Bunlar kodlarınız:

import time
import urllib.request
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

driver = webdriver.Chrome(executable_path="C:/Users/Halil/Desktop/chromedriver.exe")
# Optional argument, if not specified will search path.
driver.get('https://www.google.co.in/search?q=+demirci+&source=lnms&tbm=isch')
images = driver.find_elements_by_tag_name('img')
a=1

for image in images:
        src = image.get_attribute('src')
        a=a+1
        try:
            urllib.request.urlretrieve(src, str(a)+".png")
        except:
            continue

except kısmında continue demişsiniz ama belki bazı linkler için hata alıyorsunuz?
Bakın isterseniz:

import sys
import time
import urllib.request
import traceback
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

driver = webdriver.Chrome(executable_path="C:/Users/Halil/Desktop/chromedriver.exe")
# Optional argument, if not specified will search path.
driver.get('https://www.google.co.in/search?q=+demirci+&source=lnms&tbm=isch')
images = driver.find_elements_by_tag_name('img')
a=1

for image in images:
    src = image.get_attribute('src')
    a=a+1
    try:
        urllib.request.urlretrieve(src, str(a)+".png")
    except:
        traceback.print_exc(file=sys.stdout)
1 Beğeni

Yine aynı sayıda resim indirmekte, ve hata verdi program, continue yazmamın sebebi hata olursa bile devam etsin ama hata meydana gelince durmakta.Acaba sayfayı tam yükleyemiyor mu?

Hayır durmuyor, sadece hatalar ekrana yazdırılıyor, hata vermeyen linklerden dosyalar çekiliyor ve toplam 85 tane hata veriyor.