more ugly fixes, youtube regex
This commit is contained in:
parent
fccd5a49e0
commit
f4025b8546
|
@ -144,7 +144,11 @@ class YoutubeVideo(models.Model):
|
||||||
|
|
||||||
def get_youtube_id(self):
|
def get_youtube_id(self):
|
||||||
reg = r'http.*?v=(.*?)$'
|
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):
|
def get_dict(self):
|
||||||
if self.youtubeData != '':
|
if self.youtubeData != '':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user