jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
http://django-embed-video.rtfd.org
MIT License
382 stars 135 forks source link

YouTube get_code Should Ignore Everything After an & #17

Closed esomething closed 10 years ago

esomething commented 10 years ago

When the YT get_code function is given a URL that has any extra data after the v=CODE, the re is returning the last code whereas it should be returning the first code.

For example, take this YT url:

http://www.youtube.com/watch?v=6xu00J3-g2s&list=PLb5n6wzDlPakFKvJ69rJ9AJW24Aaaki2z

The get_code function returns PLb5n6wzDlP, where it should return 6xu00J3-g2s.

My regex skills aren't quite good enough to know how to fix this, but I'm guessing that Juda, yours are!

yetty commented 10 years ago

Hi,

which version of django-embed-video are you using? I tried to add test case for URL you provided and it passed successfully.

Try upgrade to latest version (0.7). Troubles with YT regexs were fixed and new version should be backward compatible.

esomething commented 10 years ago

I was on 0.5. I'll try upgrading!

Juda Kaleta wrote:

Hi,

which version of |django-embed-video| are you using? I tried to add test case for URL you provided and it passed successfully.

Try upgrade to latest version (|0.7|). Troubles with YT regexs were fixed and new version should be backward compatible.

— Reply to this email directly or view it on GitHub https://github.com/yetty/django-embed-video/issues/17#issuecomment-35767452.


This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com

esomething commented 10 years ago

That did the trick, thanks!