批量bing image downloader(BBID)是下載器:
pip install git+https://github.com/ostrolucky/Bulk-Bing-Image-downloader
usage: bbid.py [-h] [-f] [-o OUTPUT] [-a] [-g] [--filters FILTERS] [--limit LIMIT] [-t THREADS]
search_string [search_string ...]
Bing image bulk downloader
positional arguments:
search_string Keyword to search
optional arguments:
-h, --help show this help message and exit
-f, --search-file search-string is a path to a file containing search strings line by line
-o OUTPUT, --output OUTPUT
Output directory
-a, --adult-filter-off
Disable adult filter
-g, --animated-gif Disable adult filter
--filters FILTERS Any query based filters you want to append when searching for images, e.g. +filterui:license-L1
--limit LIMIT Make sure not to search for more than specified amount of images.
-t THREADS, --threads THREADS
Number of threads
或者,如果願意,可以觀看YouTube教程
bbid hello world
您可能需要應用Bing的一些過濾器,例如按照許可證,圖像尺寸等過濾器。BBID不會向您展示這些過濾器,但可以使用這些過濾器,可讀取這些過濾器,但允許您利用Bing網站暴露的所有過濾器。您需要做的就是通過Bing網站應用您想要的過濾器,然後從URL複製它們。它們位於&qft=
和之前的&
之前。
例如,當您搜索code
並應用過濾器past week
和圖像尺寸large
,您將看到的URL將是http://www.bing.com/images/search?sp=-1&pq=code&sc=0-0&sk=&cvid=39A810C4AF314AB6A5A923F4FB6E5282&q=code&qft=+filterui:age-lt10080+filterui:imagesize-large&FORM=IRFLTR
1&pq = code&sc = 0- 0-0-0-0&sk =&cvid http://www.bing.com/images/search?sp=-1&pq=code&sc=0-0&sk=&cvid=39A810C4AF314AB6A5A923F4FB6E5282&q=code&qft=+filterui:age-lt10080+filterui:imagesize-large&FORM=IRFLTR
您要從此URL提取的過濾器字符串是+filterui:age-lt10080+filterui:imagesize-large
。然後,您可以用 - 濾波器將它們塗在bbid中,例如
bbid code --filters +filterui:age-lt10080+filterui:imagesize-large