aboutsummaryrefslogtreecommitdiff
path: root/modules/urbandictionary.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/urbandictionary.py')
-rw-r--r--modules/urbandictionary.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/urbandictionary.py b/modules/urbandictionary.py
index 2d5edd21..2f86ff6b 100644
--- a/modules/urbandictionary.py
+++ b/modules/urbandictionary.py
@@ -1,11 +1,11 @@
import json, re
-from src import ModuleManager, Utils
+from src import ModuleManager, utils
URL_URBANDICTIONARY = "http://api.urbandictionary.com/v0/define"
REGEX_DEFNUMBER = re.compile("-n(\d+) \S+")
class Module(ModuleManager.BaseModule):
- @Utils.hook("received.command.urbandictionary|ud", min_args=1)
+ @utils.hook("received.command.urbandictionary|ud", min_args=1)
def ud(self, event):
"""
:help: Get the definition of a provided term from Urban Dictionary
@@ -17,8 +17,8 @@ class Module(ModuleManager.BaseModule):
if match:
number = int(match.group(1))
term = term.split(" ", 1)[1]
- page = Utils.get_url(URL_URBANDICTIONARY, get_params={"term": term},
- json=True)
+ page = utils.http.get_url(URL_URBANDICTIONARY,
+ get_params={"term": term}, json=True)
if page:
if len(page["list"]):
if number > 0 and len(page["list"]) > number-1: