Fixed a bug in imdb

This commit is contained in:
Luke Rogers 2012-10-19 00:06:34 +13:00
parent afc556281e
commit 2bdb7a7915

View file

@ -17,7 +17,7 @@ def imdb(inp):
else:
content = http.get_json("http://www.omdbapi.com/", t=strip)
if content['Error'] == 'Movie not found!':
if content.get('Error', None) == 'Movie not found!':
return 'Movie not found!'
elif content['Response'] == 'True':
content['URL'] = 'http://www.imdb.com/title/%(imdbID)s' % content