问题
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