I recently developed a website icon download tool that can automatically retrieve and download website icons. It’s perfect for use as a local image resource when building navigation websites.
This is a tool for batch downloading website icons (favicons), which supports both command-line and graphical user interface operations.
Project Address:
https://github.com/cheng01315/website-favicon-downloader
Directory Structure
Website Icon Downloader/
├── favicon_downloader.exe # Command-line version executable
├── favicon_gui.exe # Graphical interface version executable
├── README.md # Project documentation
├── website_ico/ # Directory for downloaded icon files
├── successful_downloads.txt # Log file of successful downloads
├── failed_downloads.txt # Log file of failed downloads
├── test_list.txt List of website domains to be downloaded by # (one per line)
└── src/ # source code directory
├── favicon_core.py # core download logic
├── favicon_downloader.py # Main program for the command-line version
├── favicon_gui.py # Main program for the GUI version
├── favicon_downloader.spec # PyInstaller configuration file
├── favicon_gui.spec # PyInstaller configuration file for the GUI version
└── __pycache__/ # Python cache directory
Features and Specifications
- Supports retrieving website icons from multiple APIs (Google, FaviconKit, Yandex, DuckDuckGo, Icon Horse)
- Offers both command-line and graphical user interface options
- Domain names can be read in bulk from a text file
- Automatically export the results of successful and failed downloads
- Supports multiple image formats (PNG, JPG, GIF, WEBP, etc.)
Instructions for Use
Command-Line Version (favicon_downloader.exe)
- Create a text file containing domain names, with one domain name per line. For example:
www.google.com www.github.com www.stackoverflow.com www.python.org
- Run the executable file and specify the path to the domain name file:
favicon_downloader.exe domains.txt
- The program will begin downloading icons in batches, and a progress indicator will appear during the download.
Graphical User Interface Version (favicon_gui.exe)
- Double-click to run
favicon_gui.exe - Click the "Browse" button to select the domain file
- Click the "Start Download" button
- You can view download progress and log information in real time.
Document Description
Executable file
favicon_downloader.exe: Command-line version, suitable for batch files and scriptsfavicon_gui.exe: Graphical user interface version, with more intuitive operation
Output File
website_ico/: This folder contains all downloaded icon files; each icon is named after the website's domain name.successful_downloads.txt: Record the domain names of successfully downloaded websites and their corresponding icon URLsfailed_downloads.txt: Record the domain names of websites where downloads failed
Source Code
src/: Includes all Python source code used for development and maintenance
Important Notes
- To prevent excessive requests, the program adds a brief delay between each request.
- Invalid icon files (smaller than 100 bytes) will be ignored.
- The program will automatically create the necessary folders and log files.
- The icon files are saved in
website_icoIn the folder, you can open it directly to view all the icons you've downloaded.




