diff options
author | Thomas Keck <thomas@thinkpad> | 2014-11-15 22:12:17 +0100 |
---|---|---|
committer | Thomas Keck <thomas@thinkpad> | 2014-11-15 22:12:17 +0100 |
commit | ece9d3b2ed629f384e5b4605f840bb1aebaf071c (patch) | |
tree | bdbdf538b42774ca61806ef268e0cce9b8a6c5eb /imdb-lookup/imdbrating.py | |
parent | 87ab025dfe883916820ecd51fd88974cabd3eb04 (diff) | |
download | scripts-ece9d3b2ed629f384e5b4605f840bb1aebaf071c.tar.gz scripts-ece9d3b2ed629f384e5b4605f840bb1aebaf071c.zip |
Ignore rating 0 and try to get rating again
Diffstat (limited to 'imdb-lookup/imdbrating.py')
-rwxr-xr-x | imdb-lookup/imdbrating.py | 4 |
1 files changed, 2 insertions, 2 deletions
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() |