我试图从此链接中提取数据:
http://212.12.182.204:8090/NewsService.svc/LatestNews
虽然我收到错误消息:
不支持Feed网址中指定的端口
我使用的代码与任何其他链接一起使用但不使用我的链接,我搜索过的所有代码都是这样做的, 这是最后一段代码:
function getFeed(url) {
url = 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url);
$.ajax({
type : 'GET',
url : url,
dataType : 'jsonp',
cache : false,
success : function(d) {
alert(JSON.stringify(d))
},
error : function(s, x) {
alert(x);
}
});
}
任何想法? THX
答案 0 :(得分:0)
您遇到的问题是Google Feeds API不支持端口8089上的HTTP资源。如果您是(或知道)Feed的发布者,您应该在端口80上提供该Feed。如果不提供例如,Superfeedr之类的另一个工具没有端口限制。