diff --git a/oxweb/imdb.py b/oxweb/imdb.py index a599d04..c86ef14 100644 --- a/oxweb/imdb.py +++ b/oxweb/imdb.py @@ -177,12 +177,11 @@ def getMovieInfo(imdbId): info['rating'] = -1 #Votes - votes = findRe(info['user rating'], '([\d,]*?) votes') - if votes: - info['votes'] = int(votes.replace(',', '')) - else: - info['votes'] = -1 - + info['votes'] = -1 + if "user rating" in info: + votes = findRe(info['user rating'], '([\d,]*?) votes') + if votes: + info['votes'] = int(votes.replace(',', '')) return info def getMovieRuntimeSeconds(imdbId):