How to extract the full content from a partial con

2019-08-07 05:53发布

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)

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

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.

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?

2条回答
Bombasti
2楼-- · 2019-08-07 06:35

If you provide a link to the rss feed I will update my answer to tell you precisely. This can only be determined on a case by case. An example of a reader can be found here http://www.w3schools.com/php/php_ajax_rss_reader.asp obviously with modern techniques you can do a lot better.

查看更多
【Aperson】
3楼-- · 2019-08-07 06:40

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.

查看更多
登录 后发表回答