Question

I used SimplePie to display RSS feed from a basketball website. The article titles show up but I want the entire article to display. I tried changing

echo $item->get_description() to echo $item->get_content()

it still only shows the little exert. I know it's possible because:

http://fulltextrssfeed.com/

this website displays the entire article just like how I want it. Any suggestions how to do this with SimplePie?

Was it helpful?

Solution

If an RSS feed does not contain the article, no matter which parser you use you will not be able to extract something from nothing.

However, what I tend to do is use Diffbot to parse articles. They have an easy-to-use API and as far as I know is the best free article parser.

So, you would get each URL and make a batch request to Diffbot which will return a large JSON array, which you can then extract the full article from.

OTHER TIPS

If the feed doesn't contains the full article you will not able to retrieve the content just from the feed. It doesn't matter what library you use to parse the data, parsing it doesn't make left out parts magically appear.

I'm only guessing since the fulltextrssfeed.com service is not open-source, but i suspect that it crawls the item links, tries to find the part that does in the feed on the webpage and extract everything that looks like the content. You can subscribe on their page to get notified when the developer API is available.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top