I recently posted a link to this YouTube video in chat:
Here's the link to the message in chat that didn't onebox:
It didn't onebox because of the ampersand before the
v in the query string parameter (even though the link is completely valid).
I've also noticed that many YouTube links won't onebox if there are other query string parameters (which is very common in YouTube links, it's how they track a number of different things like referrals).
That said, could you just parse the query string and pull the
v parameter for the video ID instead of whatever you're doing now? All you need to do is call the
ParseQueryString method on the
HttpUtility class (you don't have to do it this way, but the point is, most of the work is done somewhere for you).
Also, if it's not too much trouble, would you recognize the shortened YouTube links that are formatted like this?
This is the link that's given out on the YouTube page when you want to share, and since I'm copying it to share it here, it would be nice if it was recognized.