find new ids
This commit is contained in:
parent
942a892d46
commit
31666c5e9e
2 changed files with 8 additions and 7 deletions
|
@ -42,6 +42,8 @@ def getIds():
|
|||
m.criterion_id = id
|
||||
m.save()
|
||||
addPoster(m, poster, 'criterion.com', m.criterion_id)
|
||||
else:
|
||||
print data['title'], "no imdbId"
|
||||
|
||||
#kg
|
||||
lastId = models.Karagarga.maxId()
|
||||
|
@ -50,13 +52,11 @@ def getIds():
|
|||
print 'kg', id
|
||||
data = oxweb.karagarga.getData(id)
|
||||
if data and 'imdbId' in data:
|
||||
if 'imdbId' in data:
|
||||
m = models.getMovieIdByImdbId(data['imdbId'])
|
||||
kg = models.Karagarga()
|
||||
kg.movie_id = m
|
||||
kg.karagarga_id = id
|
||||
kg.save()
|
||||
#fixme, what to do else?
|
||||
m = models.getMovieIdByImdbId(data['imdbId'])
|
||||
kg = models.Karagarga()
|
||||
kg.movie_id = m
|
||||
kg.karagarga_id = id
|
||||
kg.save()
|
||||
for poster in data['posters']:
|
||||
addPoster(m, poster, 'karagarga.net', kg.karagarga_id)
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
from django.core.management.base import BaseCommand, CommandError
|
||||
from django.conf import settings
|
||||
|
||||
import lookup.cache
|
||||
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue