mirror of
https://github.com/kemayo/leech
synced 2025-12-06 16:33:16 +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:
parent
533c14f0d7
commit
28cc1fbcc7
1 changed files with 1 additions and 4 deletions
|
|
@ -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(),
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue