我一直在使用Google Feed API来加载RSS Feed,但看起来谷歌已经关闭了API.例如,当我尝试加载纽约时报RSS源时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}
有没有可行的替代方案?
使用Yahoo的YQL API:
select * from xml where url = 'https://news.ycombinator.com/rss'
您可以通过向callback
网址添加参数来请求JSONP Feed
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