From 5f72f23e722b530a695cc1cdd95526598197cfeb Mon Sep 17 00:00:00 2001 From: David Lynch Date: Fri, 1 Aug 2025 19:42:31 -0500 Subject: [PATCH] Note to self about royalroad chapter URLs --- sites/royalroad.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sites/royalroad.py b/sites/royalroad.py index ce700ea..8abc1ee 100644 --- a/sites/royalroad.py +++ b/sites/royalroad.py @@ -34,6 +34,9 @@ class RoyalRoad(Site): @classmethod def matches(cls, url): # e.g. https://royalroad.com/fiction/6752/lament-of-the-fallen + # Note: urls like https://www.royalroad.com/fiction/chapter/2330878 also exist, which it + # might be nice to support, but I need to look into an API call to get the work ID from + # a chapter ID. match = re.match(r'^(https?://(?:www\.)?%s\.com/fiction/\d+)/?.*' % cls.domain, url) if match: return match.group(1) + '/'