From 03ceecd38f362e1de9d1d3c09dfed6d22e4f61dd Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Tue, 15 Mar 2016 10:49:27 -0500 Subject: [PATCH] Fix for base_efiction_adapter stories with spans w/o class attr. --- fanficfare/adapters/base_efiction_adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fanficfare/adapters/base_efiction_adapter.py b/fanficfare/adapters/base_efiction_adapter.py index dbc41658..6180753d 100644 --- a/fanficfare/adapters/base_efiction_adapter.py +++ b/fanficfare/adapters/base_efiction_adapter.py @@ -382,7 +382,7 @@ class BaseEfictionAdapter(BaseSiteAdapter): while nextEl is not None and not (\ type(nextEl) is bs.Tag \ and nextEl.name == "span" \ - and 'label' in nextEl['class'] \ + and 'label' in nextEl.get('class',[]) \ # for spans without class ): ## must string copy nextEl or nextEl will change trees if (type(nextEl) is bs.Tag):