Welcome folks today in this post we will be building a bulk bing api image
scraper and downloader in python using bing-image-downloader
library. All the full source code of the application is shown below.
Get Started
In order to get started you need to install the following library using the pip
command as shown below
pip install bing-image-downloader
After installing this library you need to make an app.py
file and copy paste the following code
app.py
1 2 |
from bing_image_downloader import downloader downloader.download("ross taylor", limit=100, output_dir='dataset', adult_filter_off=True, force_replace=False, timeout=60) |
So in the above python script we are scraping images
from the query string called ross taylor
and it will search on bing images
and download them to your root directory
Now if you execute the python script by typing the below command as shown below
python app.py