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

@ -44,7 +44,7 @@ class YoutubeBrowser(BaseBrowser):
return self.page.iter_videos()
def get_video(self, _id):
if re.match('^\w+$', _id):
if re.match('^[\w-]+$', _id):
url = 'http://www.youtube.com/watch?v=%s' % _id
else:
url = _id