将 RSS 添加到任何网站?

发布于 2024-07-05 02:32:40 字数 157 浏览 5 评论 0原文

是否有任何网站/服务可以让我向任何网站添加 RSS 订阅?

这是我工作的公司。 我们有一个网站,显示公司相关新闻。 这些新闻由外部机构提供,并自动更新到我们的数据库中。 我们的网站随机/新新闻并显示它们。 我们正在考虑在我们的网站上添加“通过 RSS 订阅”按钮。

Is there any website/service which will enable me to add RSS subscription to any website?

This is for my company I work. We have a website which displays company related news. These news are supplied by an external agency and they gets updated to our database automatically. Our website picks up random/new news and displays them. We are looking at adding a "Subscribe via RSS" button to our website.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

作死小能手 2024-07-12 02:32:40

您要么需要自己动手,要么获得屏幕抓取服务。

创建 Feed 后,您可以使用 Feedburner 之类的工具来传播它。

You either need to roll your own, or get a service that is a screen scraper.

After you have created your feed, you can use something like Feedburner to disseminate it.

一萌ing 2024-07-12 02:32:40

如果您碰巧使用 ASP.NET,您可能需要查看 ASP.NET RSS 工具包 。 它对于生成和消费 feed 都很有用。

If you happen to be using ASP.NET, you might want to check out the ASP.NET RSS Toolkit. It's useful for both generating and consuming feeds.

一萌ing 2024-07-12 02:32:40

事实上,这对于雅虎来说是非常可行的! 管道。 假设 1) 您的页面大小低于 200k,2) 您的 robots.txt 文件不允许使用 Pipes,并且 3) 您的新闻源有一个唯一的 ID,如下所示:

<ul id="newsfeed">

...您可以使用 Fetch Page 模块,将其修剪为只是新闻提要中的项目,循环遍历每个列表项,并使用项目生成器模块将相关位作为适当的 RSS 提要进行处理。 然后,在文档的头部,放入一个 RSS 链接,如下所示:

<link rel="alternate" type="application/atom+xml" title="News Feed" href="http://pipes.yahoo.com/your_pipe_id" />

这当然是完全倒退的,但可以用于快速修复,或者在您无法控制正文的情况下这一页。

Actually this is very doable with Yahoo! Pipes. Assuming that 1) your page is under 200k, 2) your robots.txt file does not disallow Pipes, and 3) your news feed has a unique ID, like so:

<ul id="newsfeed">

... you could use the Fetch Page module, trim it to just the items inside the news feed, loop though each list item, and use an Item Builder module to mangle the relevant bits as a proper RSS feed. Then, in the head of your document, you'd put in an RSS link, like so:

<link rel="alternate" type="application/atom+xml" title="News Feed" href="http://pipes.yahoo.com/your_pipe_id" />

This is of course completely ass-backwards, but would work for a quick fix, or in situations where you had no control over the body of the page.

只等公子 2024-07-12 02:32:40

编写一个 Web 处理程序,将数据库内容公开为 RSS 提要。

Write a webhandler that exposes the content of the database as an RSS feed.

慢慢从新开始 2024-07-12 02:32:40

如果您无法将 RSS 提要添加到现有站点,请参阅 Page2Rss 作为中间解决方案。

If you are not in a position to add an RSS feed to the existing site, see Page2Rss as an intermediate solution.

梦过后 2024-07-12 02:32:40

Dapper 可能有用吗? 您只需要设置要搜索的新闻源的哪些部分,瞧,即时 RSS,无需接触任何代码...

Might Dapper be of some use? You just need to set up which bits of your news feed to scour and voila, instant rss without having to touch any code...

无名指的心愿 2024-07-12 02:32:40

你的问题有点难以理解。 您是否试图生成 RSS 供其他人使用,或者您是否尝试使用其他人的 RSS?

如果您尝试生成 RSS 提要供其他人使用,则需要阅读规范:

http://cyber.law.harvard.edu/rss/rss.html

如果您尝试使用它,该链接也会有所帮助。 然后您需要研究 XML/RSS 解析器。

如果您可以提供更多详细信息,我可以更新我的答案。

Your question is a little difficult to understand. Are you trying to generate the RSS for others to consume, or are you trying to consume someone else's RSS?

If you are trying to generate your RSS feed for others to consume you will need to read the spec:

http://cyber.law.harvard.edu/rss/rss.html

If you are trying to consume it, that link will also help. Then you'll need to look into an XML / RSS parser.

If you can provide more details I can update my answer.

任谁 2024-07-12 02:32:40

这里有一篇文章讨论了将生成提要的各种网络爬虫: http:// www.masternewmedia.org/news/2006/03/09/how_to_create_a_rss.htm

如果您不想点击,这里是作者讨论的服务

其他答案中建议的其他网络爬虫:

但是,您最好自己生成提要从数据库中的信息。

Here's an article that discusses various webscrapers that will generate feeds: http://www.masternewmedia.org/news/2006/03/09/how_to_create_a_rss.htm

If you don't care to click through, here are the services the author discusses:

Other webscrapers suggested in the other answers:

However, you're probably better off generating the feeds yourself from the info in the DB.

暖树树初阳… 2024-07-12 02:32:40

如果您的数据库中有数据,那么自己创建一个数据就相当简单了 - 有一个简单的教程 此处

设置提要后,在 中 在您的页面中,您可以输入如下文本:

<link rel="alternate" title="RSS Feed" 
    href="http://www.example.com/rss-feed/latest/" type="application/rss+xml" />

这允许用户的浏览器“自动发现”提要(例如,RSS 图标出现在 FF 的地址栏中)。

If you have the data in your database, creating one yourself is fairly straight forward - there's a simple tutorial here.

Once you've set up a feed, in the <head> of your page, you put text like:

<link rel="alternate" title="RSS Feed" 
    href="http://www.example.com/rss-feed/latest/" type="application/rss+xml" />

This allows the feed to be "auto-discovered" by your user's browser (e.g. the RSS icon appears in the address bar in FF).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文