From cac9258c864f72acd978366899b5b63b882ff5e8 Mon Sep 17 00:00:00 2001 From: mutantmonkey Date: Sun, 25 Aug 2013 14:32:54 -0700 Subject: [PATCH] imdb: switch to omdbapi.com domain --- modules/imdb.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/imdb.py b/modules/imdb.py index ad8c2a9..cdba5f4 100644 --- a/modules/imdb.py +++ b/modules/imdb.py @@ -15,18 +15,23 @@ def imdb_search(query): query = query.replace('!', '') query = query.encode('utf-8') query = web.quote(query) - uri = 'http://www.imdbapi.com/?i=&t=%s' % query + uri = 'http://www.omdbapi.com/?i=&t=%s' % query bytes = web.get(uri) m = json.loads(bytes) return m def imdb(phenny, input): query = input.group(2) - if not query: return phenny.reply('.imdb what?') + if not query: + return phenny.say('.imdb what?') m = imdb_search(query) try: - phenny.reply('{0} ({1}): {2} http://imdb.com/title/{3}'.format(m['Title'], m['Year'], m['Plot'], m['imdbID'])) + phenny.say('{0} ({1}): {2} http://imdb.com/title/{3}'.format( + m['Title'], + m['Year'], + m['Plot'], + m['imdbID'])) except: phenny.reply("No results found for '%s'." % query) imdb.commands = ['imdb']