From 28cc1fbcc74e7f4d5c8a1ca6a104ce69de86b43d Mon Sep 17 00:00:00 2001 From: David Lynch Date: Fri, 5 Feb 2021 19:58:38 -0600 Subject: [PATCH] Arbitrary should store contents as a string, not a bs4 Tag It coincidentally works by being string-like for previous uses, but it's not string-like enough for the new unicode stuff. Fixes #54 --- sites/arbitrary.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sites/arbitrary.py b/sites/arbitrary.py index a0710ff..7701a77 100644 --- a/sites/arbitrary.py +++ b/sites/arbitrary.py @@ -127,12 +127,9 @@ class Arbitrary(Site): # TODO: consider `'\n'.join(map(str, content.contents))` content.name = 'div' - # Extract from bs4 tree so the rest of the tree gets deleted. - content = content.extract() - chapters.append(Chapter( title=title, - contents=content, + contents=content.prettify(), # TODO: better date detection date=datetime.datetime.now(), ))