From 7c5555ea3fb6dc9be6c98f85957a9f7aa72b5573 Mon Sep 17 00:00:00 2001 From: reverie Date: Fri, 30 Oct 2015 16:27:47 +0000 Subject: [PATCH 1/2] update movie.py to use omdbapi as imdbapi is non-functional --- sopel/modules/movie.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sopel/modules/movie.py b/sopel/modules/movie.py index 1cda5e68c7..70ca5986d8 100644 --- a/sopel/modules/movie.py +++ b/sopel/modules/movie.py @@ -4,7 +4,7 @@ Copyright © 2012-2013, Elad Alfassa, Licensed under the Eiffel Forum License 2. -This module relies on imdbapi.com +This module relies on omdbapi.com """ from __future__ import unicode_literals import json @@ -25,7 +25,7 @@ def movie(bot, trigger): if not trigger.group(2): return word = trigger.group(2).rstrip() - uri = "http://www.imdbapi.com/?t=" + word + uri = "http://www.omdbapi.com/?t=" + word u = web.get(uri, 30) data = json.loads(u) # data is a Dict containing all the information we need if data['Response'] == 'False': @@ -33,9 +33,9 @@ def movie(bot, trigger): message = '[MOVIE] %s' % data['Error'] else: LOGGER.warning( - 'Got an error from the imdb api, search phrase was %s; data was %s', + 'Got an error from the OMDb api, search phrase was %s; data was %s', word, str(data)) - message = '[MOVIE] Got an error from imdbapi' + message = '[MOVIE] Got an error from omdbapi' else: message = '[MOVIE] Title: ' + data['Title'] + \ ' | Year: ' + data['Year'] + \ From 13c2fdcaac8b972bbc122dfc16af040f7cf1c698 Mon Sep 17 00:00:00 2001 From: reverie Date: Fri, 30 Oct 2015 15:29:33 -0400 Subject: [PATCH 2/2] minor cosmetic change --- sopel/modules/movie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sopel/modules/movie.py b/sopel/modules/movie.py index 70ca5986d8..105bff1b89 100644 --- a/sopel/modules/movie.py +++ b/sopel/modules/movie.py @@ -35,7 +35,7 @@ def movie(bot, trigger): LOGGER.warning( 'Got an error from the OMDb api, search phrase was %s; data was %s', word, str(data)) - message = '[MOVIE] Got an error from omdbapi' + message = '[MOVIE] Got an error from OMDbapi' else: message = '[MOVIE] Title: ' + data['Title'] + \ ' | Year: ' + data['Year'] + \