diff --git a/safaribooks.py b/safaribooks.py index 8647477..95c13a3 100644 --- a/safaribooks.py +++ b/safaribooks.py @@ -153,6 +153,9 @@ class Display: self.out(output) def parse_description(self, desc): + if not desc: + return "n/d" + try: return html.fromstring(desc).text_content()