diff --git a/plugins/books.py b/plugins/books.py index 722a86017..ca260bbfd 100644 --- a/plugins/books.py +++ b/plugins/books.py @@ -32,7 +32,13 @@ def books(text): book = json['items'][0]['volumeInfo'] title = book['title'] - author = book['authors'][0] + try: + author = book['authors'][0] + except KeyError: + try: + author = book['publisher'] + except KeyError: + author = "Unknown Author" try: description = formatting.truncate_str(book['description'], 130)