support URLs and IDs with '-' in

This commit is contained in:
Romain Bignon 2010-04-26 17:14:15 +02:00
commit 31863d3171
4 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ class YoutubeBackend(BaseBackend, ICapVideoProvider):
def need_url(func):
def inner(self, *args, **kwargs):
url = args[0]
if (u'youtube.com' not in url) and not re.match('^\w+$', url):
if (u'youtube.com' not in url) and not re.match('^[\w-]+$', url):
return None
return func(self, *args, **kwargs)
return inner