0
我有一個https網站,我需要創建一個rss提要。我可以成功獲取http站點的rss提要,但我一直未能成功訪問https站點。我用谷歌,雅虎和其他許多閱讀rss,但一直不成功。我需要使用jQuery或js或jsp/java來閱讀rss feed。任何幫助將不勝感激。https提要閱讀器。 js jquery
//this is just for test
YUI().use('yql', function(Y){
var query = 'select * from rss(0,3) where url = "some https site"'
var q = Y.YQL(query, function(r){
//r now contains the result of the YQL Query as a JSON
var feedmarkup = '<p>'
var feed = r.query.results.item // get feed as array of entries
for (var i=0; i<feed.length; i++){
feedmarkup += '<a href="' + feed[i].link + '">'
feedmarkup += feed[i].title + '</a><br />'
feedmarkup += feed[i].description + '</p>'
}
document.getElementById('qznews').innerHTML = feedmarkup
})
})
//this is just for the test
<script src="http://yui.yahooapis.com/3.18.1/build/yui/yui-min.js"></script>
<div id="qznews"></div>