Skip to main content

This package is built on top of bing-image-downloader by gaurav singh

Project description

Better Bing Image Downloader

Table of Contents

Disclaimer

This program lets you download tons of images from Bing. Please do not download or use any image that violates its copyright terms.

GitHub top language GitHub Hits

Installation

git clone https://github.com/KTS-o7better_bing_image_downloader
python -m venv ./env
source env/bin/activate
cd better_bing_image_downloader
pip install .

or

pip install better-bing-image-downloader

PyPi

Package Link

Usage

Using as a Package:

from better_bing_image_downloader import downloader

downloader(query_string, limit=100, output_dir='dataset', adult_filter_off=True,
force_replace=False, timeout=60, filter="", verbose=True, badsites= [], name='Image')

query_string : String to be searched.
limit : (optional, default is 100) Number of images to download.
output_dir : (optional, default is 'dataset') Name of output dir.
adult_filter_off : (optional, default is True) Enable of disable adult filteration.
force_replace : (optional, default is False) Delete folder if present and start a fresh download.
timeout : (optional, default is 60) timeout for connection in seconds.
filter : (optional, default is "") filter, choose from [line, photo, clipart, gif, transparent]
verbose : (optional, default is True) Enable downloaded message.
bad-sites : (optional, defualt is empty list) Can limit the query to not access the bad sites.
name : (optional, default is 'Image') Can add a custom name for the images that are downloaded.

Using as a Command Line Tool:

    git clone https://github.com/KTS-o7/better_bing_image_downloader.git
    cd better_bing_image_downloader
    python -m venv ./env
    source env/bin/activate
    pip install -r requirements.txt
    cd better_bing_image_downloader
    # This is an example query
    python multidownloader.py "cool doggos" --engine "Bing"  --max-number 50 --num-threads 5 --driver "firefox_headless"   

Command Line Arguments:

multidownloader.py "keywords" [-h] [--engine {Google,Bing}] [--driver {chrome_headless,chrome,api,firefox,firefox_headless}] [--max-number MAX_NUMBER] [--num-threads NUM_THREADS] [--timeout TIMEOUT] [--output OUTPUT] [--safe-mode] [--face-only] [--proxy_http PROXY_HTTP] [--proxy_socks5 PROXY_SOCKS5] [--type {clipart,linedrawing,photograph}] [--color COLOR]
  • "keywords": Keywords to search. ("in quotes")
  • -h, --help: Show the help message and exit
  • --engine, -e: Image search engine. Choices are "Google" and "Bing". Default is "Bing".
  • --driver, -d: Image search engine. Choices are "chrome_headless", "chrome", "api", "firefox", "firefox_headless". Default is "firefox_headless".
  • --max-number, -n: Max number of images download for the keywords. Default is 100.
  • --num-threads, -j: Number of threads to concurrently download images. Default is 50.
  • --timeout, -t: Seconds to timeout when download an image. Default is 10.
  • --output, -o: Output directory to save downloaded images. Default is "./download_images".
  • --safe-mode, -S: Turn on safe search mode. (Only effective in Google)
  • --face-only, -F: Only search for faces.
  • --proxy_http, -ph: Set http proxy (e.g. 192.168.0.2:8080)
  • --proxy_socks5, -ps: Set socks5 proxy (e.g. 192.168.0.2:1080)
  • --type, -ty: What kinds of images to download. Choices are "clipart", "linedrawing", "photograph".
  • --color, -cl: Specify the color of desired images.
# Example usage
python multidownloader.py "Cool Doggos" --engine Google --driver chrome --max-number 50 --num-threads 10 --timeout 60 --output "./doggo_images" --safe-mode --proxy_http "192.168.0.2:8080" --type photograph --color blue

Star History

Star History Chart

License

This project is licensed under the terms of the MIT license.

Contact

If you have any questions or feedback, please contact us at email.

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

better_bing_image_downloader-1.1.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file better_bing_image_downloader-1.1.2.tar.gz.

File metadata

File hashes

Hashes for better_bing_image_downloader-1.1.2.tar.gz
Algorithm Hash digest
SHA256 c6ed5a97fc8e3ab2fc9239bf26a313b665fca5dc9e8e07880844122171a44050
MD5 001670226814fb5d0c65762a5d40e1f0
BLAKE2b-256 62980da044111ad44b5e52ed688db77d4ed2d7aaa772847edd252dc49bf75821

See more details on using hashes here.

File details

Details for the file better_bing_image_downloader-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for better_bing_image_downloader-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 099254fa9ff8af2d2b3e8c68bb54bcb296a2122c3cbd35f15223a4ab5738e03e
MD5 59aee0ab9dc7ce6a8e528907cb9dc252
BLAKE2b-256 5a58e99fecc593e2d22252b8bb5ac113ab3917a5aa2d1f2f9ef7edfffb5444e6

See more details on using hashes here.

Supported by

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