I've got a script that goes through the page and returns all selected elements - in this case, <embed...>
For example, when a YouTube video is found in a blog, it returns an iframe. I can take the iframe src, pass it through a function, and regex the video ID. However, when the YouTube video in within a YouTube page, its embedded differently and the video ID is found within the "flashvars" attribute.
Here's an example video embed : http://pastie.org/7155840
What would you guys recommend the best way of confirming the src as YouTube, and getting the video ID qlo5XHZ8-zI from it?