小编典典

使用AJAX加载RSS feed:替代Google Feed API?

ajax

我一直在使用Google Feed API加载RSS feed,但是Google似乎已经关闭了该API。例如,当我尝试在加载“纽约时报” RSS
feed时http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=1000&q=http%3A%2F%2Frss.nytimes.com%2Fservices%2Fxml%2Frss%2Fnyt%2FHomePage.xml,得到以下响应:

{"responseData": null, "responseDetails": "This API is no longer available.", "responseStatus": 403}

有没有可行的选择?


阅读 259

收藏
2020-07-26

共1个答案

小编典典

使用Yahoo的YQL API

select * from xml where url = 'https://news.ycombinator.com/rss'

您可以通过向callback网址添加参数来请求JSONP供稿

https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%20%3D%20'https%3A%2F%2Fnews.ycombinator.com%2Frss'&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=mycallback
2020-07-26