This script uses the polyhaven API to download HDRI images by category, resolution and extention. The images are stored in folders per resolution.
Installing python requests module:
pip3 install requests
# refer to the polyhaven website for available resolutions, categories and extentions
./downloader.py <resolution> <category> <extention>