From 47fd71c4b9790a34926649f5bf7535df1df57819 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 5 May 2025 12:59:38 -0500 Subject: [PATCH] XF2: Allow extra / before threads in story URL. --- fanficfare/adapters/base_xenforo2forum_adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fanficfare/adapters/base_xenforo2forum_adapter.py b/fanficfare/adapters/base_xenforo2forum_adapter.py index 2cee4ec7..368b86ce 100644 --- a/fanficfare/adapters/base_xenforo2forum_adapter.py +++ b/fanficfare/adapters/base_xenforo2forum_adapter.py @@ -91,7 +91,7 @@ class BaseXenForo2ForumAdapter(BaseSiteAdapter): def getSiteURLPattern(self): ## need to accept http and https still. - return re.escape(self.getURLPrefix()).replace("https","https?")+r"(?Pthreads|posts)/(?P.+\.)?(?P<id>\d+)/?[^#]*?(#?post-(?P<anchorpost>\d+))?$" + return re.escape(self.getURLPrefix()).replace("https","https?")+r"/?(?P<tp>threads|posts)/(?P<title>.+\.)?(?P<id>\d+)/?[^#]*?(#?post-(?P<anchorpost>\d+))?$" ## For adapters, especially base_xenforoforum to override. Make ## sure to return unchanged URL if it's NOT a chapter URL. This