如何从部分内容 rss 中提取全部内容 [英] How to extract the full content from a partial content rss

查看:59
本文介绍了如何从部分内容 rss 中提取全部内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个 PHP 项目.目标(用简单的语言)是阅读 RSS 提要,从中获取标题、完整内容和媒体(视频和/或图像),然后将其发布到 wordpress 博客中.(客户希望使用一些开放共享的资源并使用它们在他的博客中自动发布)

I am working on a PHP project. The goal (in a simple lang) is to read an RSS feed, and get the title, full content, and media (video and/or images) from it, and post it in a wordpress blog. (The customer wants to use some sources that are open for sharing and use them for auto posting in his blog)

我成功地提取了标题、内容和图像或视频,并将它们发布到 wordpress 中.但是,有一些问题:

I successfully could extract the title, content and images or videos and post them in wordpress. However, there are some problems:

1) 我只能提取包含在 RSS 中的媒体.2)如果RSS是部分内容RSS,我无法提取内容的全文.

1) I can only extract the media if they are included in the RSS. 2) I cannot extract the full text of the content if the RSS is a partial content RSS.

那么,是否有任何解决方案能够从 RSS 访问原始内容并提取全文内容和媒体(如果有)?

So, is there any solution to be able to access the original content from RSS and extract the full text content and media if available?

推荐答案

RSS 提供者决定是否导出全文.因此,如果它仅导出部分内容,您可能需要通过 curl(或其他)获取链接的完整内容,并尝试找出完整内容的位置.

The RSS provider decides if the full text is exported or not. So if it exports just the partial content, you may have to get the full content of the link by curl(or others) and try to figure out where the full content is.

这篇关于如何从部分内容 rss 中提取全部内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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