diff options
| author | 2018-08-31 10:51:47 +0100 | |
|---|---|---|
| committer | 2018-08-31 10:51:47 +0100 | |
| commit | 90ce92dc39395444862edfc7946ef7a1195f2464 (patch) | |
| tree | 6832c146a15879df292d265083bfe5795cbdfa69 /modules/upc.py | |
| parent | Reformat (diff) | |
Revert "Reformat"
This reverts commit abed9cf
Diffstat (limited to 'modules/upc.py')
| -rw-r--r-- | modules/upc.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/upc.py b/modules/upc.py index 96e53042..37588481 100644 --- a/modules/upc.py +++ b/modules/upc.py @@ -2,10 +2,8 @@ import Utils UPCITEMDB_URL = "https://api.upcitemdb.com/prod/trial/lookup" - class Module(object): _name = "UPC" - def __init__(self, bot): self.bot = bot bot.events.on("received").on("command").on( @@ -20,8 +18,8 @@ class Module(object): return page = Utils.get_url(UPCITEMDB_URL, - get_params={"upc": event["args_split"][0]}, - json=True) + get_params={"upc": event["args_split"][0]}, + json=True) if page: if not len(page["items"]): event["stderr"].write("UPC/EAN not found") @@ -49,8 +47,7 @@ class Module(object): lowest_price, highest_price, currency) event["stdout"].write("%s%s%s(weight: %s" - ", size: %s, price: %s)" % ( - brand, title, description, weight, size, - pricing)) + ", size: %s, price: %s)" % ( + brand, title, description, weight, size, pricing)) else: event["stderr"].write("Failed to load results") |
