import urllib.request import os base_url = "https://shivasakthi.ca/" static_dir = "/mnt/extra-addons/dine360_theme_shivasakthi/static/src/img" assets_to_download = { "assets/images/shapes/hero-shape3.png": "assets/images/shapes/hero-shape3.png", "assets/images/home/category/hakka.webp": "assets/images/home/category/hakka.webp", "assets/images/home/category/veg-biryani.webp": "assets/images/home/category/veg-biryani.webp", "assets/images/home/category/veg-curry.webp": "assets/images/home/category/veg-curry.webp", "assets/images/home/category/nonveg-biryani.webp": "assets/images/home/category/nonveg-biryani.webp" } for remote, local in assets_to_download.items(): url = base_url + remote local_path = os.path.join(static_dir, local) os.makedirs(os.path.dirname(local_path), exist_ok=True) print(f"Downloading {url} to {local_path}...") try: urllib.request.urlretrieve(url, local_path) print("Success!") except Exception as e: print(f"Failed: {e}")