{"action":"created","issue":{"url":"https://api.github.com/repos/mps-youtube/pafy/issues/104","labels_url":"https://api.github.com/repos/mps-youtube/pafy/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/mps-youtube/pafy/issues/104/comments","events_url":"https://api.github.com/repos/mps-youtube/pafy/issues/104/events","html_url":"https://github.com/mps-youtube/pafy/issues/104","id":92736132,"number":104,"title":"pafy uses regexes to parse youtube IDs","user":{"login":"puckipedia","id":488734,"avatar_url":"https://avatars.githubusercontent.com/u/488734?v=3","gravatar_id":"","url":"https://api.github.com/users/puckipedia","html_url":"https://github.com/puckipedia","followers_url":"https://api.github.com/users/puckipedia/followers","following_url":"https://api.github.com/users/puckipedia/following{/other_user}","gists_url":"https://api.github.com/users/puckipedia/gists{/gist_id}","starred_url":"https://api.github.com/users/puckipedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puckipedia/subscriptions","organizations_url":"https://api.github.com/users/puckipedia/orgs","repos_url":"https://api.github.com/users/puckipedia/repos","events_url":"https://api.github.com/users/puckipedia/events{/privacy}","received_events_url":"https://api.github.com/users/puckipedia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-02T21:08:57Z","updated_at":"2015-07-15T16:38:55Z","closed_at":null,"body":"This causes some interesting issues, as in (the completely valid URL) https://www.youtube.com/watch?av=3kRINw0tQtU&v=dQw4w9WgXcQ which shows up as 'Wolfgun - Burn' but actually opens the rickroll if you open it in a browser. This is a serious issue that could cause unwanted rickrolling :) (I use it in my IRC bot to handle youtube URL info, had to properly parse the url, was fun to find the issue)"},"comment":{"url":"https://api.github.com/repos/mps-youtube/pafy/issues/comments/121672592","html_url":"https://github.com/mps-youtube/pafy/issues/104#issuecomment-121672592","issue_url":"https://api.github.com/repos/mps-youtube/pafy/issues/104","id":121672592,"user":{"login":"puckipedia","id":488734,"avatar_url":"https://avatars.githubusercontent.com/u/488734?v=3","gravatar_id":"","url":"https://api.github.com/users/puckipedia","html_url":"https://github.com/puckipedia","followers_url":"https://api.github.com/users/puckipedia/followers","following_url":"https://api.github.com/users/puckipedia/following{/other_user}","gists_url":"https://api.github.com/users/puckipedia/gists{/gist_id}","starred_url":"https://api.github.com/users/puckipedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puckipedia/subscriptions","organizations_url":"https://api.github.com/users/puckipedia/orgs","repos_url":"https://api.github.com/users/puckipedia/repos","events_url":"https://api.github.com/users/puckipedia/events{/privacy}","received_events_url":"https://api.github.com/users/puckipedia/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T16:38:55Z","updated_at":"2015-07-15T16:38:55Z","body":"how I would do it is to try to parse it as a video ID, then try the youtu.be thing, then use urlparse + urlparse_qs to parse it, so it would still support the normal features.\r\n\r\n@ids1024: Close, but youtube uses the first video ID passed by query string (av= is not valid, so it ignores it). If you have two videos passed in the right way, it always uses the first (same behavior in Python, according to my tests)"}}