We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f0e2248 + 0a56521 commit ec27e69Copy full SHA for ec27e69
1 file changed
plugins/books.py
@@ -32,7 +32,13 @@ def books(text):
32
33
book = json['items'][0]['volumeInfo']
34
title = book['title']
35
- author = book['authors'][0]
+ try:
36
+ author = book['authors'][0]
37
+ except KeyError:
38
39
+ author = book['publisher']
40
41
+ author = "Unknown Author"
42
43
try:
44
description = formatting.truncate_str(book['description'], 130)
0 commit comments