Searching in yahoo using java [closed]

五迷三道 提交于 2019-12-13 11:30:54

问题


Recently I wrote a program to search yahoo with a given string.

The string I passed to my program is http://api.search.yahoo.com/WebSearchService/V1/webSearch?site="+URLEncoder.encode(sitename)+"&appid=YahooDemo&query="+URLEncoder.encode(query)+"&results=20&start="+pagec+"&output=json.

Parameters:

  • sitename for getting results for a particular site
  • query for string that to be searched in yahoo server.

But I'm getting the following error when I execute this program:

{
    "Error": {
        "Message": ["The service has been shut down. For further details, please see the Deprecated Services blog post http://developer.yahoo.com/blogs/ydn/posts/2010/08/api_updates_and_changes"],
        "Title": "The following errors were detected:"
    }
}

What is the cause for getting this error?


回答1:


The service has been shut down since April 2011. You can use Yahoo! Search BOSS instead, but you've to pay for it.

You may consider switching to Google Custom Search which is free up to 100 queries per day, afaik.




回答2:


Seems like you're OK and they just shut down the service. Have you read the blog entry they sent you back?



来源:https://stackoverflow.com/questions/9716398/searching-in-yahoo-using-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!