do not fail with empty/missing title
This commit is contained in:
parent
3f4780b3cf
commit
c1bf3aa080
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ def events(scheduleUrl, titlemap={}):
|
|||
# yield a tupel with the event-id, event-title and person-names
|
||||
yield {
|
||||
'id': int(event.get('id')),
|
||||
'title': titlemap[id] if id in titlemap else event.find('title').text.strip(),
|
||||
'title': titlemap[id] if id in titlemap else (event.find('title').text.strip() if event.find('title') is not None and event.find('title').text is not None else ''),
|
||||
'subtitle': event.find('subtitle').text.strip() if event.find('subtitle') is not None and event.find('subtitle').text is not None else '',
|
||||
'persons': personnames,
|
||||
'personnames': ', '.join(personnames)
|
||||
|
|
Loading…
Add table
Reference in a new issue