i trying use pybingsearch module https://github.com/tristantao/py-bing-search use bing api return search results. in github page have example of how use goes.
from py_bing_search import pybingwebsearch search_term = "python software foundation" bing_web = pybingwebsearch('your-api-key-here', search_term, web_only=false) # web_only optional, should true use web quota instead of purpose quota first_fifty_result= bing_web.search(limit=50, format='json') #1-50
when try , run line declares first_fifity_result
error stating request returned code 401, error msg: authorization type provided not supported. basic , oauth supported
why error? in code made sure change your-api-key-here
api key.
did swap api key? says "your-api-key-here"
bing_web = pybingwebsearch('your-api-key-here', search_term, web_only=false) # web_only optional, should true use web quota instead of purpose quota
Comments
Post a Comment