简体   繁体   中英

how to get image search result using bing search api with python?

I need some image sample for machine learning training. I have not enough resource now, so I need to crawl some using the search engine. Google is not free now and I choose bing.

I have tried pybing . It seems not work now.

I don't known how to get the appid.

from py_bing_search import PyBingImageSearch


bing_image = PyBingImageSearch('Your-Api-Key-Here', "x-box console", image_filters='Size:medium+Color:Monochrome') #image_filters is optional

first_fifty_result= bing_image.search(limit=50, format='json') #1-50

print (first_fifty_result[0].media_url)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM