This is a Python script that downloads all resources (images, scripts, stylesheets, etc.) from a given website.
- Downloads all resources from a given website
- Option to filter resources by file extension
- Saves a table of the download status of each resource in Markdown format
- Option to delete the download folder after downloading resources
- Logging: Messages are logged to a file for troubleshooting and record keeping
- Python 3
requests
beautifulsoup4
colorama
prettytable
-
Install the required Python packages:
pip install requests beautifulsoup4 colorama prettytable
-
Run the script with the URL of the website and the folder to download resources to:
python main.py https://example.com resources
-
To filter resources by file extension, use the
--extensions
option followed by the extensions you want to download:python main.py https://example.com resources --extensions jpg png
-
To delete the download folder after downloading resources, use the
--delete
option:python main.py https://example.com resources --delete
-
To enable logging to a file, use the
--log
option followed by the name of the log file:python main.py https://example.com resources --log download.log
This project is licensed under the MIT License - see the LICENSE file for details. @mehmetkahya0