diff --git a/download_colorpostcards.py b/download_colorpostcards.py index d148ca353f8d84e80ca73c14c90c3e0b2872b79f..d20c27ad38a21a77d9674e0e37706e146c86b6c7 100644 --- a/download_colorpostcards.py +++ b/download_colorpostcards.py @@ -1,3 +1,4 @@ +import os from iiif_utils import get_imgurls_from_collectionurl, create_paths_from_iiifurls, download_images_multithreded from time import time @@ -7,6 +8,9 @@ urls = get_imgurls_from_collectionurl(collection_of_colorpostcards) dur = time() - start print(f'downloaded {dur}') urls = [e.replace('full/full', 'full/256,256') for e in urls] # downlaod with 256x256 + +if not os.path.exists('postcards_256'): + os.makedir('postcards_256') paths = create_paths_from_iiifurls(urls, 'postcards_256') download_images_multithreded(urls, paths, 10)