From ea3432bc990283edea237dcea86012d2bebc5c2c Mon Sep 17 00:00:00 2001 From: David Lynch Date: Sun, 28 May 2017 01:15:04 -0500 Subject: [PATCH] AO3: author notes should be included --- sites/ao3.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sites/ao3.py b/sites/ao3.py index a8fcee3..b4062ec 100644 --- a/sites/ao3.py +++ b/sites/ao3.py @@ -52,7 +52,14 @@ class ArchiveOfOurOwn(Site): for landmark in content.find_all(class_='landmark'): landmark.decompose() - return content.prettify() + # TODO: Maybe these should be footnotes instead? + notes = soup.select('#chapters .end.notes') + if notes: + notes = notes[0] + for landmark in notes.find_all(class_='landmark'): + landmark.decompose() + + return content.prettify() + (notes and notes.prettify() or '') @register