😫 The Pain Point
Your supplier sends an Excel file: Column A is SKU (SP001), Column B is Image Link (https://.../img1.jpg).
You need to download these 1,000 images and rename them to SP001.jpg to upload to your store.
Click link -> Save As -> Type Name… 1,000 times? Impossible.
🚀 Agentic Solution
“Downloader Pro”: Handles the shopping for you. Give it a list, and it fetches the files.
Key Features:
- Auto Rename: Uses the SKU column to rename the files instantly.
- Error Log: Tracks which links are dead (404) so you can fix them.
- Multithreading: Downloads 10 images at once (10x faster).
⚔️ Phase 1: Commander (Quick Fix)
For small batches.
Prompt:
“I have
products.xlsxwith ‘Link’ and ‘Code’ columns. Write a script to read this, download each URL to a ‘Downloads’ folder, and name the file using the ‘Code’ (e.g., Code ‘A1’ -> ‘A1.jpg’).”
Result: Sequential download script.
🏗️ Phase 2: Architect (Permanent Tool)
For E-commerce Admins.
Engineering Prompt:
**Role:** Python Network Developer
**Task:** Create a "Batch Image Downloader" from Excel.
**Requirements:**
1. **GUI:**
* Select Excel File.
* Dropdown: "URL Column" (Source).
* Dropdown: "Filename Column" (Target Name).
* Select Output Folder.
* "Download" button.
2. **Logic:**
* Use Pandas to read data.
* Use `requests` to fetch images.
* *Optimization:* Use `concurrent.futures` for parallel downloading.
* Handle errors (404, Timeout) and skip bad links without crashing.
3. **Deliverables:** `img_downloader.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- Concurrent/Parallel: Downloading is an I/O bound task (waiting for the network). The prompt specifically asks for parallel processing, reducing a 20-minute task to 2 minutes.
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Select Excel columns -> Start.