如果我将以下网址与Google Feed API一起使用,则无效;
http://news.google.co.in/news?hl=en&gl=in&q=something&um=1&ie=UTF-8&output=atom
OR
http://news.google.co.in/news?hl=en&gl=in&q=something&um=1&ie=UTF-8&output=rss
它给了我null。然而,任何其他网站的RSS工作完美。我正在使用jGFeed。
(function($){
$.extend({
jGFeed : function(url, fnk, num, key){
// Make sure url to get is defined
if(url == null) return false;
// Build Google Feed API URL
var gurl = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q="+url;
if(num != null) gurl += "&num="+num;
if(key != null) gurl += "&key="+key;
// AJAX request the API
$.getJSON(gurl, function(data){
if(typeof fnk == 'function')
fnk.call(this, data.responseData.feed);
else
return false;
});
}
});
})(jQuery);
我尝试了什么错?