This is much more robust than just using regexps, and handles all the common scenarios, such as empty/no values, repeated attributes, entity decoding, mixed case names, and the different possible value quoting schemes.
This is useful as a) RTMP downloads are a good deal faster to download b) Older items are available only as RTMP streams
While here, stop RteIE changing filename extensions to .mp4. The files saved are .flv containers with h264 video.