Skip to main content

image_mint

Purpose

  • This python package can be used to search for and download images from various search engines. You can specify minimum width and height of the image if you want.

Installation

  • You must have Chrome browser installed. You can download it from https://www.google.com/chrome/ On Ubuntu, you can run:
    sudo dpkg -i google-chrome-stable_current_amd64.deb```
    
  • You must download Chrome webdriver. You can download it from https://chromedriver.chromium.org/downloads To know which version of Chrome is installed to match the driver version, you can use this command on Ubuntu: dpkg --list|grep chrome
  • After that, you can install the package using pip:
    pip install image_mint
    

Usage:

You can use the package in python code like so:

    from image_mint import Scraper  
    from image_mint.engines import Google
    scraper = Scraper(Google('c:/temp/animals/chromedriver.exe'))
    scraper.download("cat", "c:/temp/animals/images", limit=100, min_width=200)

Example on Windows You can also use command line:

image_mint.exe -c C:\temp\animals\chromedriver.exe -d C:\temp\animals\images -e Bing "Wild cats" -l 20 -mw 200

Note that the windows executable can be downloaded from https://github.com/kouroshparsa/image_mint/blob/main/image_mint/bin/image_mint.exe

Here are the flags that can be used:

  • -e : the search engine, possible values: DogPile/Bing/Google/DuckDuckGo/Yahoo
  • -d : the destination folder to download images to
  • -c : the chrome driver path using
  • -l : number of images to download
  • -mw : minimum width
  • -mh : minimum height

Example on Linus You can use other languages as well:

image_mint -c /tmp/chromedriver -d /tmp/images -e Google "πλοίο" -l 20 -mw 200

On some linux environment particularly Docker images, it is possible that after installing the package it does not recognize the image_mint executable. In that case, run:

export PATH=$PATH:~/.local/bin

or if you want it persist, add it to ~/.bashrc

Metadata

Release files for image-mint 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for image-mint 1.0.4
File Size Uploaded Provenance Actions
image_mint-1.0.4.tar.gz 20.2 kB Without provenance Details for image_mint-1.0.4.tar.gz

Release files / image_mint-1.0.4.tar.gz

Download URL image_mint-1.0.4.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
38bda8fd1ad25047935e5f1af280b274b4c6aaf8856ed94ffec7c7c043173338
BLAKE2b-256 checksum
How to use checksums
65f7513936244d9c9d5bd379a84369b260ed8326dbd6005a88caf1d59cb6a5ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.1

Security for image-mint 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page