aboutsummaryrefslogtreecommitdiff
path: root/modules/books.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 10:51:47 +0100
committerGravatar dngfx2018-08-31 10:51:47 +0100
commit90ce92dc39395444862edfc7946ef7a1195f2464 (patch)
tree6832c146a15879df292d265083bfe5795cbdfa69 /modules/books.py
parentReformat (diff)
Revert "Reformat"
This reverts commit abed9cf
Diffstat (limited to 'modules/books.py')
-rw-r--r--modules/books.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/books.py b/modules/books.py
index f27247dd..5f7c0627 100644
--- a/modules/books.py
+++ b/modules/books.py
@@ -5,10 +5,8 @@ URL_GOOGLEBOOKS = "https://www.googleapis.com/books/v1/volumes"
URL_BOOKINFO = "https://books.google.co.uk/books?id=%s"
REGEX_BOOKID = re.compile("id=([\w\-]+)")
-
class Module(object):
_name = "ISBN"
-
def __init__(self, bot):
self.bot = bot
bot.events.on("received").on("command").on("isbn").hook(
@@ -26,7 +24,7 @@ class Module(object):
book = page["items"][0]["volumeInfo"]
title = book["title"]
sub_title = (", %s" % book.get("subtitle")
- ) if book.get("subtitle") else ""
+ ) if book.get("subtitle") else ""
authors = ", ".join(book.get("authors", []))
authors = " - %s" % authors if authors else ""