From 9958678af10086973e4537d0d14c5d6fac75bcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 4 Feb 2026 11:50:07 +0100 Subject: [PATCH] [simpcity] extract 'reddit' media embeds (#8994) --- gallery_dl/extractor/xenforo.py | 6 ++++-- test/results/simpcity.py | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/xenforo.py b/gallery_dl/extractor/xenforo.py index 0d32a2b5..bc5b92de 100644 --- a/gallery_dl/extractor/xenforo.py +++ b/gallery_dl/extractor/xenforo.py @@ -362,9 +362,11 @@ class XenforoExtractor(BaseExtractor): continue type = data.get("data-s9e-mediaembed") + frag = src[src.find("#")+1:] if type == "tiktok": - url = ("https://www.tiktok.com/@/video/" + - src[src.rfind("#")+1:]) + url = "https://www.tiktok.com/@/video/" + frag + elif type == "reddit": + url = "https://embed.reddit.com/r/" + frag else: self.log.warning("%s: Unsupported media embed type '%s'", post["id"], type) diff --git a/test/results/simpcity.py b/test/results/simpcity.py index 1b65a538..dc0ac266 100644 --- a/test/results/simpcity.py +++ b/test/results/simpcity.py @@ -249,6 +249,15 @@ __tests__ = ( "#results" : "https://www.tiktok.com/@/video/7556556034794425631", }, +{ + "#url" : "https://simpcity.cr/threads/alrightsierra.70601/post-571509", + "#comment" : "reddit s9e media embed iframe (#8996)", + "#category": ("xenforo", "simpcity", "post"), + "#class" : xenforo.XenforoPostExtractor, + "#auth" : True, + "#results" : "https://embed.reddit.com/r/TikTokFeet/comments/rtzwnz#theme=auto", +}, + { "#url" : "https://simpcity.cr/threads/alua-tatakai.89490/", "#category": ("xenforo", "simpcity", "thread"),