批量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