updated ox
This commit is contained in:
parent
61c3684ad5
commit
33788b2da7
|
@ -1,12 +1,13 @@
|
||||||
from django.contrib.gis.db import models
|
from django.contrib.gis.db import models
|
||||||
import oxlib
|
#import oxlib
|
||||||
|
import ox
|
||||||
import flickr
|
import flickr
|
||||||
import settings
|
import settings
|
||||||
try:
|
try:
|
||||||
import json
|
import json
|
||||||
except:
|
except:
|
||||||
import simplejson as json
|
import simplejson as json
|
||||||
from oxweb import youtube
|
from ox.web import youtube
|
||||||
from settings import MEDIA_URL
|
from settings import MEDIA_URL
|
||||||
from os.path import join
|
from os.path import join
|
||||||
|
|
||||||
|
@ -106,7 +107,7 @@ class Video(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)
|
return ox.text.find_re(self.url, reg)
|
||||||
|
|
||||||
def get_dict(self):
|
def get_dict(self):
|
||||||
if self.youtubeData != '':
|
if self.youtubeData != '':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user