Skip to content

Commit

Permalink
Update bing_search_api.py
Browse files Browse the repository at this point in the history
Updated example to highlight query string as variable
  • Loading branch information
xthepoet committed Jun 18, 2013
1 parent f23e046 commit fb96d75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bing_search_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ def search(self, sources, query, params):

if __name__ == "__main__":
my_key = "[your key]"
query_string = "Brad Pitt"
bing = BingSearchAPI(my_key)
params = {'ImageFilters':'"Face:Face"',
'$format': 'json',
'$top': 10,
'$skip': 0}
print bing.search('image+web','Your Name',params).json() # requests 1.0+
print bing.search('image+web',query_string,params).json() # requests 1.0+

0 comments on commit fb96d75

Please sign in to comment.