Why `search.web` YQL table doesn't work anymore?

一笑奈何 提交于 2019-12-23 16:26:56

问题


When I'm using search.web YQL table, I always get the error:

No definition found for Table search.web

in my YQL statements. Even when using SELECT url FROM search.web(0,10) WHERE query="stackoverflow" for example.

So I am assuming Yahoo discontinued search.web or BOSS? What are the alternatives? Is there still a similar way to crawl the web?


回答1:


We can read in YQL Blog:

We’ve removed all search tables that relied on the BOSS v1 API (search.web, search.image, and search.news) as the aforementioned BOSS v1 no longer exists as of today (http://www.ysearchblog.com/2011/06/30/you-asked-for-this-boss-v2-updates/).

For those of you relying on those tables please consider using the community BOSS v2 table (https://github.com/yql/yql-tables/blob/master/boss/boss.search.xml).

Thanks -YQL Team

Source: Search tables and BOSS v1 in YQL Blog.


As a result, you should move to another search service like Y! BOSS v2. As mentioned above there are already open data tables for that, and an example query would look like:

SELECT * FROM boss.search WHERE query="stackoverflow"
AND ck="your oauth consumer key" 
AND secret="your oauth secret"

Another alternative is to use Bing search:

SELECT * FROM microsoft.bing.web WHERE query="stackoverflow"



回答2:


BOSS v1 API has been depreciated (as in YQL Blog), so you should use BOSS v2 API which works exactly the same, but the table is called boss.search and it's available in Yahoo YQL Dev Console (just activate Show Community Tables or check at GitHub).

To use BOSS v2 API, you need to have your own Consumer Key and Consumer Secret which can be generated at Yahoo Dev Apps by creating a new app.

Sample usage:

select * from boss.search where q = "sam pullara" AND (ck = 'ConsumerKey') AND (secret = 'SECRET');


来源:https://stackoverflow.com/questions/6917007/why-search-web-yql-table-doesnt-work-anymore

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