Jak wyszukiwać obrazy Bing przy użyciu słów kluczowych?Wyszukiwanie Bing za pośrednictwem interfejsu API Azure za pomocą języka Python
jestem w stanie za pomocą wyszukiwarki Google:
import urllib2
import json
credentialGoogle = '' # Google credentials from: https://console.developers.google.com/
searchString = 'Xbox%20One'
top = 20
offset = 0
while offset < top:
url = 'https://ajax.googleapis.com/ajax/services/search/images?' + \
'v=1.0&q=%s&start=%d&userip=%s' % (searchString, offset, credentialGoogle)
request = urllib2.Request(url)
response = urllib2.urlopen(request)
results = json.load(response)
# process results
offset += 4 # since Google API only returns 4 search results at a time
Jaki byłby równoważny dla Bing? Prawdopodobnie zaczynałoby się od:
keyBing = '' # Bing key from: https://datamarket.azure.com/account/keys
credentialBing = '' # same as key?
searchString = '%27Xbox+One%27'
top = 20
offset = 0
url = 'https://api.datamarket.azure.com/Bing/Search/Image?' + \
'Query=%s&$top=%d&$skip=%d&$format=json' % (searchString, top, offset)
, ale w jaki sposób konfiguruje się referencje?
http://www.guguncube.com/2771/python-using-the-bing-search-api –
@Camron_Go to było pomocne. – jensph
Dla interfejsu API Google: "Ten interfejs API nie jest już dostępny." –