π« The Pain Point
You have an Excel with 500 product URLs in column A and image URLs in column B. You need to download all images and name them by product name.
π Agentic Solution
A Concurrent Image Downloader that processes Excel data efficiently.
Key Features:
- Concurrent Downloads: Process multiple images simultaneously.
- Smart Naming: Use Excel column for filenames.
- Error Recovery: Retry failed downloads, log errors.
βοΈ Phase 1: Commander (Quick Fix)
For quick downloading.
Prompt:
βI have an Excel
products.xlsxwith columns βProduct_Nameβ and βImage_URLβ. Write a Python script using requests to:
- Download: Each image from URL.
- Naming: Use Product_Name as filename.
- Concurrent: Use threading for 5 simultaneous downloads.
- Output: Save to
images/folder.Print progress. Retry failed downloads once. Log failures to
errors.csv.β
Result: All product images organized by name.
ποΈ Phase 2: Architect (Permanent Tool)
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create an "Excel Image Downloader".
**Requirements:**
1. **GUI:**
* Select Excel file.
* Column pickers for URL and Filename.
* Concurrent downloads slider (1-10).
* Progress bar.
* Error log viewer.
2. **Logic:**
* Use aiohttp for async downloads.
* Validate URLs before downloading.
* Handle different image formats.
* Sanitize filenames.
3. **Deliverables:**
* `image_downloader.py`
* `run.bat`, `run.sh`
* `requirements.txt`
π§ Prompt Decoding
- Threading/Async: Downloading one by one is slow. Concurrent processing can be 5-10x faster.
π οΈ Instructions
- Copy Prompt β Run.