Reputation: 6720
So I'm brainstorming right now and would like to hear your thoughts on this.
So you know the news app, pulse?
As you can see it pulls thumbnails from virtually any news source.
I'm curious as to how they gather the title and image from various sources since their RSS feeds will always vary.
I was thinking, for each article in the RSS feed, I would just iterate over its content until I find a preg_match
for an image source.
Is that the best way to generically determine the image? ..How about the title?
:)
Upvotes: 0
Views: 128
Reputation: 848
The titles is obviously from the RSS. Look at any rss feeds for their title tags.
Probably the only tricky part is the thumbnail. However some RSS feeds like Engadget http://www.engadget.com/rss.xml; has image associate with each article (under the CDATA of the description tag) which can be easily regex match.
Upvotes: 1