项目
在 GitHub 查看
gurugaurav/bing_image_downloader
关于
Python library to download bulk of images from Bing.com
设计与媒体实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Bing Image Downloader
Python library to download bulk images from Bing.com. No external dependencies — pure stdlib.
Disclaimer
This program lets you download images from Bing. Please do not download or use any image that violates its copyright terms.
Installation
pip install bing-image-downloader
Or from source:
git clone https://github.com/gurugaurav/bing_image_downloader
cd bing_image_downloader
pip install .
Python API
from bing_image_downloader import download
download(
query,
limit=100,
output_dir='dataset',
adult_filter_off=True,
force_replace=False,
timeout=60,
filter='',
verbose=True,
)
| Parameter | Default | Description |
|---|---|---|
query |
— | Search term |
limit |
100 |
Number of images to download |
output_dir |
'dataset' |
Root directory; images go into <output_dir>/<query>/ |
adult_filter_off |
True |
Set False to enable Bing's adult content filter |
force_replace |
False |
Delete existing output folder and start fresh |
timeout |
60 |
Request timeout in seconds |
filter |
'' |
Image type filter — see options below |
verbose |
True |
Print download progress |
Filter options: line, photo, clipart, gif, animatedgif, transparent
Command-line interface
python -m bing_image_downloader <query> [options]
positional arguments:
query Search query
options:
--limit N Number of images to download (default: 100)
--output-dir DIR Root directory for downloads (default: dataset)
--adult-filter-on Enable adult content filter (default: off)
--filter TYPE Image type: line, photo, clipart, gif, animatedgif, transparent
--timeout SECS Request timeout in seconds (default: 60)
--force-replace Delete existing output directory before downloading
--quiet Suppress progress output
Examples:
# Download 50 cat images
python -m bing_image_downloader "cats" --limit 50
# Download clipart into a custom folder, silently
python -m bing_image_downloader "logo design" --limit 20 --output-dir ./images --filter clipart --quiet
# Fresh download with adult filter enabled
python -m bing_image_downloader "art" --force-replace --adult-filter-on
Running tests
python test.py
PyPI
https://pypi.org/project/bing-image-downloader/
Donate
If this project was helpful, you can buy me a coffee.
探索相关项目
加载中…