如何发现给定URL的RSS源 [英] How To Discover RSS Feeds for a given URL

查看:167
本文介绍了如何发现给定URL的RSS源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从用户那里得到一个URL.我要知道:
a)URL是有效的RSS提要吗?
b)如果不存在与该URL相关的有效供稿

I get a URL from a user. I need to know:
a) is the URL a valid RSS feed?
b) if not is there a valid feed associated with that URL

使用PHP/Javascript或类似的东西

using PHP/Javascript or something similar

(例如, http://techcrunch.com 失败a),但是b)会返回其RSS feed)

(Ex. http://techcrunch.com fails a), but b) would return their RSS feed)

修改:请参阅我的 answer 下方

See my answer below

推荐答案

找到了我想要的东西:

Google的 AJAX Feed API 具有加载供稿和查找供稿功能(文档此处).

Google's AJAX Feed API has a load feed and lookup feed function (Docs here).

a)

a) Load feed provides the feed (and feed status) in JSON

b)查找供稿提供给定URL的RSS供稿

b) Lookup feed provides the RSS feed for a given URL

还有一个查找提要功能,该功能可根据关键字搜索RSS提要.

Theres also a find feed function that searches for RSS feeds based on a keyword.

计划与JQuery的$ .getJSON一起使用

Planning to use this with JQuery's $.getJSON

这篇关于如何发现给定URL的RSS源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆