How can i download 1000+ images quicker using thread pool? as it’s taking far too long to download these 1000+ images witt my current script
current script
import request
image_url = [
“http://image_eg_001”,
“http://image_eg_002”,
“http://image_eg_003”,
]
for img in image_url:
file_name = img.split(‘/‘)[-1]
print(“Downloading File:%s”%file_name)
r = request.get(img, stream=True)
with open(file_name, ‘wb’) as f:
for chunk in r:
f.write(chunk)