From 955b4a4e9b83e260512d794f540f6b1821108217 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 7 Jul 2023 15:30:34 +0530 Subject: [PATCH] avoid description: None --- ox/web/imdb.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index affbf99..96454f7 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -732,11 +732,14 @@ class Imdb(SiteParser): cat = c['node']['category']['text'] if cat not in connections: connections[cat] = [] - connections[cat].append({ + connection = { 'id': c['node']['associatedTitle']['id'][2:], 'title': c['node']['associatedTitle']['titleText']['text'], - 'description': c['node'].get('text') - }) + } + description = c['node'].get('text', '') + if description: + connection['description'] = description + connections[cat].append(connection) return connections