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

AO3: fallback for single-chapter works

This commit is contained in:
David Lynch 2020-05-04 00:31:19 -05:00
parent 64fbdac4cd
commit 2103f37cfb

View file

@ -73,7 +73,8 @@ class ArchiveOfOurOwn(Site):
story.add(Chapter(
title=link.string,
contents=self._chapter(soup.find(id=f'chapter-{index + 1}')),
# the `or soup` fallback covers single-chapter works
contents=self._chapter(soup.find(id=f'chapter-{index + 1}') or soup),
date=updated
))