Downloading Images with Python
- Chris Wong
- Sep 30
- 1 min read
At Haruki Robotics Lab, we teach and learn by making. Even a small project like this helps students understand how coding can bridge the digital world with the physical one.
At Haruki Robotics Lab, students learn how coding can connect them to real-world data and resources. In this project, we use Python to automatically download images from the internet. Parents can explore this too, making it an engaging activity that blends coding with creativity.

Python Code
from icrawler.builtin import GoogleImageCrawler
google_crawler = GoogleImageCrawler(storage={"root_dir": "images"})
google_crawler.crawl(
keyword="panda",
max_num=1
)How It Works
Step 1: Import the GoogleImageCrawler from icrawler.
Step 2: Tell Python where to save the images (images folder).
Step 3: Choose a keyword (in this example: panda).
Step 4: Download the specified number of images (max_num=1).
Learning Goals
Students see how Python can search the web and save media automatically. This teaches how programs interact with online services, which is an important skill for bigger robotics and data projects.
Next Steps
Download more than one image by increasing max_num.
Let the user type the search keyword from the terminal.
Combine this with computer vision code to analyze downloaded pictures.



Comments