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"