diff options
| author | 2018-08-31 10:50:37 +0100 | |
|---|---|---|
| committer | 2018-08-31 10:50:37 +0100 | |
| commit | abed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch) | |
| tree | 3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/imdb.py | |
| parent | Fix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff) | |
| signature | ||
Reformat
Diffstat (limited to 'modules/imdb.py')
| -rw-r--r-- | modules/imdb.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/imdb.py b/modules/imdb.py index c24b4c0a..42285737 100644 --- a/modules/imdb.py +++ b/modules/imdb.py @@ -1,4 +1,4 @@ -#--require-config omdbapi-api-key +# --require-config omdbapi-api-key import json import Utils @@ -6,8 +6,10 @@ import Utils URL_OMDB = "http://www.omdbapi.com/" URL_IMDBTITLE = "http://imdb.com/title/%s" + class Module(object): _name = "IMDb" + def __init__(self, bot): self.bot = bot bot.events.on("received").on("command").on("imdb").hook( @@ -19,7 +21,7 @@ class Module(object): page = Utils.get_url(URL_OMDB, get_params={ "t": event["args"], "apikey": self.bot.config["omdbapi-api-key"]}, - json=True) + json=True) if page: if "Title" in page: event["stdout"].write("%s, %s (%s) %s (%s/10.0) %s" % ( |
