如何以编程方式将任何网页转换为 RSS 提要? [英] How to programmatically turn any webpage into an RSS feed?

查看:49
本文介绍了如何以编程方式将任何网页转换为 RSS 提要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有许多网站和博客提供 RSS 提要,但另一方面,也有许多网站和博客不提供.我想将这种类型的网页转换为 RSS 提要.

There are many websites and blog which provide RSS feeds, but on the other hand there are also many which do not. I want to turn that type of web page into RSS feeds.

我通过 Google 找到了一些解决方案,例如 Feed43Page2rssDapper 等,但我想要一个开源项目可以执行此任务或任何解释它的教程.

I found some solutions using through Google like Feed43, Page2rss, Dapper etc, but I want an Open Source project which can perform this task or any tutorial explaining about it.

请给我建议,如果你能解释,欢迎你.

Please give me suggestions and if you can explain, you are most welcome.

我更喜欢的语言是 PHP.

My preferable language is PHP.

推荐答案

RSS 没有什么神奇之处.我建议您阅读本教程以了解如何从头开始构建 RSS 提要:

There's nothing magic about RSS. I suggest you read this tutorial to understand how to build an RSS feed from scratch:

http://www.xul.fr/en-xml-rss.html

然后使用您的 PHP 技能从您的内容中构建一个.可以通过搜索html 到 rss 转换器"或其他任何内容在线找到通用的 HTML 到 RSS 抓取工具,但其中大部分将是托管解决方案,并且它们生成的 RSS 提要不是那么好.一个好的 RSS 提要需要了解您正在联合的内容,而不仅仅是原始 HTML.恕我直言.

Then use your PHP skills to build one from your content. A generic HTML-to-RSS scraper can be found online by searching for "html to rss converter" or whatever, but most of these will be hosted solutions and the RSS feeds they produce aren't that great. A good RSS feed requires understanding the content that you're syndicating, not just the raw HTML. IMHO.

这篇关于如何以编程方式将任何网页转换为 RSS 提要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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