Source code for the Python image-fetcher library
MIT License
A simple lightweight library to download images (and other files)
With Python 3.5+ run:
pip install image-fetcher
The simplest usage involves passing a list of URL's and the folder you want the images to be saved to:
from image_fetcher import multi_thread_image_download
multi_thread_image_download(
["https://benaandrew.github.io/images/sentiment.jpg","https://benaandrew.github.io/images/dog.jpg"],
"images",
)
If you have your URL's saved in a text file you can instead give the path to that file
multi_thread_image_download(
"urls.txt",
"images",
)
You can pass these like so:
multi_thread_image_download(
"urls.txt",
"images",
max_fetching_threads=5,
download_timeout=10,
verbose=False
)