Skip to main content

Lightweight, dependency-free webpage image scraper

Project description

Made By Daniel Enesi.

Python Web Image Extractor

This Python project extracts images from a website url

  • It can access many image formats including SVG.
  • It works using only Python Standard Library modules.

Usage

  1. Through the Tkinter UI
  • Run python main.py
  • A tkinter window should pop up providing a textbox.
  • Enter the URL into the textbox and click "Get Images"
  • When it is done, click the download button to download the images
  • Select the folder you want to store the images
  • Wait for the images from the website or html file path to download
  • When the images download, the folder is automatically opened for you to view the images.
  1. Via the command line
  • Run python main.py <url> --fp <destination_path> --isfile
  • Prints the image sources to console
  • <url>: The link to html webpage
    • If --isfile is specified, <url> maps to a file in the runner's system
  • <destination_path> is the path to store the images
    • If it is omitted, the images will not be stored
  1. Using imports
  • Install by running python -m pip install web-image-extractor
  • Use from image_extractor import download_images, extract_images
  • extract_images will get image sources from a webpage
  • download_images will attempt to fetch the contents of the files and save them to your filesystem
  • extract_and_download extracts images and downloads them to your file system. It takes a url and a destination folder

Notes

  • To avoid overwriting files already present in your file system, choose an empty folder while using
  • --isfile and --fp are undergoing testing and development
  • The application might not work for some websites
  • The tkinter interface might appear unresponsive sometimes, but it's probably just in an loop
  • That said, I'll work to make it asynchronous so the UI doesn't freeze
  • Would it be nice if I have an executable in this repo? So people don't need to code to use this.

Create a detailed issue to report a bug (I am aware of some), suggest a feature, or propose an improvement.
Enjoy using this!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

web_image_extractor-0.2.2.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

web_image_extractor-0.2.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file web_image_extractor-0.2.2.tar.gz.

File metadata

  • Download URL: web_image_extractor-0.2.2.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for web_image_extractor-0.2.2.tar.gz
Algorithm Hash digest
SHA256 237cae5193c96368b69757ce5c49e150f051612021af21ab12daff789a7c537f
MD5 68d99752e8de349b2bd0175c18056327
BLAKE2b-256 cc6eb76d01536f7e08c7eed1aca0a75e7fecd48717ff1f3a8274933f50ec5316

See more details on using hashes here.

File details

Details for the file web_image_extractor-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for web_image_extractor-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a7906f226563fa3f6a5a9cc46df6bd9120b71a4f1f42864fb4ba192313414cac
MD5 6620d64b7dcbdbc02a2045a99e1a1e92
BLAKE2b-256 35780182ec254b843815a5c4aaf6abd10f04eafc4788ca31ddaacf65ff5548de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page