Skip to content

abdullah-aksoy/ImageDownloader-URL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

ImageDownloaderFrom-URL

This Python script downloads images from a list of URLs and saves them to a specified folder. It includes error handling, URL validation, and logging.

Features

  • Downloads images from a list of URLs.
  • Saves images to a specified folder.
  • Validates URLs before downloading.
  • Logs download progress and errors.
  • Adds a user-agent header to requests.
  • Includes a timeout for requests to avoid hanging indefinitely.

Requirements

  • Python 3.x
  • requests library

Installation

  1. Clone the repository:

    git clone https://github.com/abdullah-aksoy/ImageDownloader-URL
    cd ImageDownloader-URL
    
  2. Install the required libraries:

    pip install requests

Usage

  1. Update the urls list in the script with the URLs of the images you want to download.

  2. Run the script:

    python download_images.py

Code Explanation

The script performs the following steps:

  1. Configures logging to display download progress and errors.
  2. Defines a list of image URLs to download.
  3. Creates an output folder to save the downloaded images.
  4. Validates each URL before attempting to download.
  5. Downloads each image and saves it with an appropriate filename and extension.
  6. Logs the success or failure of each download.

Disclaimer

Use this script responsibly. Make sure you have permission to download images from the provided URLs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages