avoid description: None
This commit is contained in:
parent
677b61877e
commit
955b4a4e9b
1 changed files with 6 additions and 3 deletions
|
@ -732,11 +732,14 @@ class Imdb(SiteParser):
|
||||||
cat = c['node']['category']['text']
|
cat = c['node']['category']['text']
|
||||||
if cat not in connections:
|
if cat not in connections:
|
||||||
connections[cat] = []
|
connections[cat] = []
|
||||||
connections[cat].append({
|
connection = {
|
||||||
'id': c['node']['associatedTitle']['id'][2:],
|
'id': c['node']['associatedTitle']['id'][2:],
|
||||||
'title': c['node']['associatedTitle']['titleText']['text'],
|
'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
|
return connections
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue