only print new items added
This commit is contained in:
parent
5151f8195b
commit
51dbcadf11
1 changed files with 1 additions and 1 deletions
|
@ -31,12 +31,12 @@ def getIds():
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
if models.MovieId.objects.all().filter(impawards_id=id).count() == 0:
|
if models.MovieId.objects.all().filter(impawards_id=id).count() == 0:
|
||||||
print 'impawards', ox.web.impawards.getUrl(id)
|
|
||||||
data = ox.web.impawards.getData(id)
|
data = ox.web.impawards.getData(id)
|
||||||
if data and 'imdbId' in data:
|
if data and 'imdbId' in data:
|
||||||
m = models.getMovieIdByImdbId(data['imdbId'])
|
m = models.getMovieIdByImdbId(data['imdbId'])
|
||||||
if m:
|
if m:
|
||||||
if not m.impawards_id:
|
if not m.impawards_id:
|
||||||
|
print 'impawards', ox.web.impawards.getUrl(id)
|
||||||
m.impawards_id = id
|
m.impawards_id = id
|
||||||
m.save()
|
m.save()
|
||||||
for poster in data['posters']:
|
for poster in data['posters']:
|
||||||
|
|
Loading…
Reference in a new issue