more ugly fixes, youtube regex

This commit is contained in:
sanj 2010-10-26 01:42:50 +02:00
parent fccd5a49e0
commit f4025b8546

View File

@ -144,7 +144,11 @@ class YoutubeVideo(models.Model):
def get_youtube_id(self):
reg = r'http.*?v=(.*?)$'
return oxlib.findRe(self.url, reg)
id = oxlib.findRe(self.url, reg)
if id == '':
reg = r'http://.*?/user/.*?/u/.*?/(.*?)$'
id = oxlib.findRe(self.url, reg)
return id
def get_dict(self):
if self.youtubeData != '':