From 9ff3cc4a8ef422ae55005858f2a9e884bc80e570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 31 Dec 2025 10:48:51 +0100 Subject: [PATCH] [xenforo] fix incomplete video URLs (#8786) --- gallery_dl/extractor/xenforo.py | 4 ++++ test/results/atfforum.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/gallery_dl/extractor/xenforo.py b/gallery_dl/extractor/xenforo.py index 5281f781..838a4043 100644 --- a/gallery_dl/extractor/xenforo.py +++ b/gallery_dl/extractor/xenforo.py @@ -41,6 +41,7 @@ class XenforoExtractor(BaseExtractor): r')' ).findall + root_media = self.config_instance("root-media") or self.root for post in self.posts(): urls = extract_urls(post["content"]) if post["attachments"]: @@ -74,6 +75,8 @@ class XenforoExtractor(BaseExtractor): text.nameext_from_url(url, data) data["id"] = text.parse_int( data["filename"].partition("-")[0]) + if url[0] == "/": + url = root_media + url yield Message.Url, url, data elif (inline := inl1 or inl2): @@ -274,6 +277,7 @@ BASE_PATTERN = XenforoExtractor.update({ }, "atfforum": { "root": "https://allthefallen.moe/forum", + "root-media": "https://allthefallen.moe", "pattern": r"(?:www\.)?allthefallen\.moe/forum", "cookies": ("xf_user",), }, diff --git a/test/results/atfforum.py b/test/results/atfforum.py index 83fd2979..3df86868 100644 --- a/test/results/atfforum.py +++ b/test/results/atfforum.py @@ -58,6 +58,15 @@ __tests__ = ( "#class" : xenforo.XenforoPostExtractor, }, +{ + "#url" : "https://www.allthefallen.moe/forum/index.php?threads/shoujo-ramune-episode-1-decensored-by-deepcreampy.17050/#post-19803487", + "#comment" : "incomplete video URL (#8786)", + "#category": ("xenforo", "atfforum", "post"), + "#class" : xenforo.XenforoPostExtractor, + "#auth" : True, + "#results" : "https://allthefallen.moe/forum/data/video/1094/1094367-e46ad8636dee0d4488db56d3770919cc.mp4", +}, + { "#url" : "https://www.allthefallen.moe/forum/index.php?threads/final-fantasy-xiv.57090/", "#category": ("xenforo", "atfforum", "thread"),