1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-15 21:05:59 +01:00

Add handling for votes that don't have a votes kvp

This commit is contained in:
thegrinner 2019-10-03 17:36:43 -04:00
parent 5e034a7d65
commit d0402daa7b

View file

@ -55,6 +55,9 @@ class FictionLive(Site):
if segment['nt'] == 'chapter':
html.extend(('<div>', segment['b'].replace('<br>', '<br/>'), '</div>'))
elif segment['nt'] == 'choice':
if not 'votes' in segment:
# Somehow, sometime, we end up with a choice without votes (or choices)
continue
votes = {}
for vote in segment['votes']:
votechoices = segment['votes'][vote]