kylejginavan/youtube_it — pull request #164 by nzaillian (2013-04-27 00:18:16+00:00)
Title: vid parsing regex incorrect

Hi, the current vid-parsing regex just uses the "w+" token and doesn't capture hyphens or underscores (which can be in youtube vids). For example, try the following (this is a real youtube video that I was trying to fetch info for in my app):

client = YouTubeIt::Client.new
video = client.video_by("http://www.youtube.com/watch?v=CBvFZV-jdHY")

Because there's a hyphen in that vid, all that gets parsed out currently is "CBvFZV" and, basically, everything fails. Please merge this when you can (just changed regex to match all alphanumeric strings including hyphens and underscores). I'm monkey-patching over the method right now in an initializer to get around this problem, which is pretty critical