2009年5月2日星期六

用yql查出hacker news 最热门的新闻

hacker news是一个新闻挖掘机器,有优秀的机制筛选出质量较高的新闻,首页更新很快。使用yql可以查出首页最热的新闻。
可以看出yql的强大之处。
查询语句是:

  select * from html where url="http://news.ycombinator.com/" and   xpath='//tr/td/a[substring(@href,1,4)="http"][@href!="http://ycombinator.com"]' 
你可以在这里测试一下(需要登录):

http://developer.yahoo.com/yql/console/

直接查看结果

没有评论: