1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-06 08:22:56 +01:00

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
This commit is contained in:
David Lynch 2021-02-05 19:58:38 -06:00
parent 533c14f0d7
commit 28cc1fbcc7

View file

@ -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(),
))