var site = 'www.mysite.com/news.aspx?rss=1';
var yql = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from xml where url="' + site + '"') + '&format=xml';
$.get(yql).done(function (rss)
{
//do the Things
}
目前我有这个功能试图加载外部网站的RSS提要。不幸的是,它没有正确加载Feed,所以我不能做这些事情。此Feed使用Google Feeds Api正确加载,但由于这种情况很快就被驳斥了,我正试图转移到使用Javascript加载RSS的其他方法(跨域)。有没有我不正确的YQL网址?雅虎查询语言 - RSS
error="Redirected to a robots.txt restricted URL: http(s)://www.mySite.com/news.aspx?rss=1"