Skip to content

rinajhinjhina/bing-search-image-scraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scrape Images using Bing Search API

Requirements

You'll need a Azure account and a Bing Search Resource to make this work. Once you have those, you need to get your API key, create a secret.yaml file in the root of the project with this information:

secret.yaml

azure_secret_key: "your API key"

Install all dependencies:

python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt

Run

src/main.py features an example of the script in use.

from search_images import ImageSearch

instance = ImageSearch(DEFAULT_SECRET_PATH, OUTPUT_DIRECTORY)
instance.search_and_download_into_folder("search_query", max_images=150, page=1)

By default DEFAULT_SECRET_PATH is secret.toml and OUTPUT_DIRECTORY is data. Data will get downloaded as count.jpg.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published