only print new items added

This commit is contained in:
j 2011-11-03 11:29:53 +01:00
parent 5151f8195b
commit 51dbcadf11

View file

@ -31,12 +31,12 @@ def getIds():
):
continue
if models.MovieId.objects.all().filter(impawards_id=id).count() == 0:
print 'impawards', ox.web.impawards.getUrl(id)
data = ox.web.impawards.getData(id)
if data and 'imdbId' in data:
m = models.getMovieIdByImdbId(data['imdbId'])
if m:
if not m.impawards_id:
print 'impawards', ox.web.impawards.getUrl(id)
m.impawards_id = id
m.save()
for poster in data['posters']: