From abed9cf4ea71dcbad2dd2c049683b8d14b942e09 Mon Sep 17 00:00:00 2001 From: dngfx Date: Fri, 31 Aug 2018 10:50:37 +0100 Subject: Reformat --- modules/books.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/books.py') diff --git a/modules/books.py b/modules/books.py index 5f7c0627..f27247dd 100644 --- a/modules/books.py +++ b/modules/books.py @@ -5,8 +5,10 @@ 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( @@ -24,7 +26,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 "" -- cgit v1.3.1-10-gc9f91