diff --git a/fanficdownloader/adapters/adapter_storiesonlinenet.py b/fanficdownloader/adapters/adapter_storiesonlinenet.py index 46620c9..29d6267 100644 --- a/fanficdownloader/adapters/adapter_storiesonlinenet.py +++ b/fanficdownloader/adapters/adapter_storiesonlinenet.py @@ -322,8 +322,8 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter): div.append(div1) # removing all the left-over stuff - for a in div.findAll('span'): - a.extract() + # for a in div.findAll('span'): + # a.extract() for a in div.findAll('h1'): a.extract() diff --git a/fanficdownloader/htmlheuristics.py b/fanficdownloader/htmlheuristics.py index c16d5cc..52a78df 100644 --- a/fanficdownloader/htmlheuristics.py +++ b/fanficdownloader/htmlheuristics.py @@ -137,6 +137,9 @@ def replace_br_with_p(body): contentLinesSum += lineLen if lineLen > longestLineLength: longestLineLength = lineLen + + if contentLines == 0: + contentLines = 1 averageLineLength = contentLinesSum/contentLines