I have a PHP script that uses LastRSS to read RSS feeds of video sites like YouTube. It then attempts to parse the fields of these feeds to locate the thumbnails, path to videos, etc...
The problem: these feeds are highly inconsistent from site to site. I've concluded that attempting to hard-code work-arounds for all the funkyness encountered in various feeds is a losing battle.
So the solution, I believe, is to allow an XSLT transformation to be inserted ahead of LastRSS that takes the funky feed and converts it into a standard format that the program understands.
This job entails the following:
1. Write an ALTER TABLE statement that adds a column to the appropriate table in the DB to specify an optional XSL file to be used for a given feed.
2. Write a PHP "adapter" page that will be called by LastRSS (instead of it calling feed URL directly). This adapter page will see if there is an XSL file specified and, if so, will retrieve the feed contents, apply the transformation, and then return the results of the transformation to LastRSS. If no XSL file is specified, the adapter page will just retrieve the feed contents and pass them on to LastRSS.
3. Write XSL files to adapt Google Video and YouTube feeds.