migrate changed ox api, getUrl -> readUrl
This commit is contained in:
parent
f7a9ce1364
commit
d7bde2776e
2 changed files with 2 additions and 3 deletions
|
@ -3,9 +3,8 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from ox.cache import getUrlUnicode
|
from ox.cache import readUrlUnicode
|
||||||
from ox import findRe
|
from ox import findRe
|
||||||
import ox.net
|
|
||||||
import ox.web.criterion
|
import ox.web.criterion
|
||||||
import ox.web.karagarga
|
import ox.web.karagarga
|
||||||
import ox.web.imdb
|
import ox.web.imdb
|
||||||
|
|
|
@ -58,7 +58,7 @@ class PosterCache(models.Model):
|
||||||
try:
|
try:
|
||||||
import ox.net
|
import ox.net
|
||||||
name = hashlib.sha1(self.url).hexdigest()
|
name = hashlib.sha1(self.url).hexdigest()
|
||||||
data = ox.net.getUrl(self.url)
|
data = ox.net.readUrl(self.url)
|
||||||
self.image.save(name, ContentFile(data))
|
self.image.save(name, ContentFile(data))
|
||||||
except:
|
except:
|
||||||
self.failed = True
|
self.failed = True
|
||||||
|
|
Loading…
Reference in a new issue