AMI-system / gbif_download_standalone

A standalone repo to download images from the GBIF database according to a species list.
MIT License
0 stars 0 forks source link

Catch non ascii characters in image URLs #11

Open LevanBokeria opened 1 year ago

LevanBokeria commented 1 year ago

Similar to Kat's other issue with the old download code.

Example image URL: 'http://ww2.bgbm.org/specimentool/Animals/Insects/Synanthedon_cf_vespiformis_Dürbye_Aserbaidschan_2010_2.jpg'

Try:

image_url = 'http://ww2.bgbm.org/specimentool/Animals/Insects/Synanthedon_cf_vespiformis_Dürbye_Aserbaidschan_2010_2.jpg'

write_location = '"/Users/lbokeria/Desktop'

urllib.request.urlretrieve(
    image_url, write_location
)