Skip to content

Instantly share code, notes, and snippets.

@shanirub
Forked from nposener/yad.py
Created June 22, 2020 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shanirub/45ac2c0bfe5cca7929892eafd200d3e9 to your computer and use it in GitHub Desktop.
Save shanirub/45ac2c0bfe5cca7929892eafd200d3e9 to your computer and use it in GitHub Desktop.
yad_vashem_scrape
import requests
import shutil
image_path = 'http://namesfs.yadvashem.org/documentation4/16/12587775_03289775/'
path_to_save = '/Users/<USER_NAME>/Downloads/'
number_of_images = 51
for i in range(number_of_images):
image_name = str(i+1).zfill(5) + '.JPG'
resp = requests.get(image_path+image_name, stream=True)
with open(path_to_save + image_name, 'wb') as f:
resp.raw.decode_content = True
shutil.copyfileobj(resp.raw, f)
print('Saved ' + image_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment