From ece9d3b2ed629f384e5b4605f840bb1aebaf071c Mon Sep 17 00:00:00 2001 From: Thomas Keck Date: Sat, 15 Nov 2014 22:12:17 +0100 Subject: Ignore rating 0 and try to get rating again --- imdb-lookup/imdbrating.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'imdb-lookup/imdbrating.py') diff --git a/imdb-lookup/imdbrating.py b/imdb-lookup/imdbrating.py index de4c167..662b8d9 100755 --- a/imdb-lookup/imdbrating.py +++ b/imdb-lookup/imdbrating.py @@ -45,7 +45,7 @@ if __name__ == u"__main__": for filename in sys.argv[1:]: imdb_id = filename.split('#')[-1] - if imdb_id not in db.keys(): + if imdb_id not in db.keys() or db[imdb_id] == 0: db[imdb_id] = str(get_rating(imdb_id)) - print db[imdb_id] + print u"{rating} {filename}".format(rating=db[imdb_id], filename=filename.decode('utf-8')) db.close() -- cgit v1.2.1