diff --git a/gallery_dl/extractor/subscribestar.py b/gallery_dl/extractor/subscribestar.py index 989e6cc9..0a1a4188 100644 --- a/gallery_dl/extractor/subscribestar.py +++ b/gallery_dl/extractor/subscribestar.py @@ -50,10 +50,16 @@ class SubscribestarExtractor(Extractor): for num, item in enumerate(media, 1): item.update(data) item["num"] = num - text.nameext_from_url(item.get("name") or item["url"], item) - if item["url"][0] == "/": - item["url"] = self.root + item["url"] - yield Message.Url, item["url"], item + + url = item["url"] + if name := (item.get("name") or item.get("original_filename")): + text.nameext_from_name(name, item) + else: + text.nameext_from_url(url, item) + + if url[0] == "/": + url = f"{self.root}{url}" + yield Message.Url, url, item def posts(self): """Yield HTML content of all relevant posts""" diff --git a/test/results/subscribestar.py b/test/results/subscribestar.py index 94850ac3..f9f8a62c 100644 --- a/test/results/subscribestar.py +++ b/test/results/subscribestar.py @@ -62,7 +62,7 @@ __tests__ = ( "content" : r"re:
Topics we cover:
\n\nTree breaks, Foot stomps, Tracks and trackways, Hoots/calls with answers, \nTree structures, nests, Portal Cracks, Shapeshifting, Shimmer/invisibility \ncloaking, direct physical interaction inside the cloaking field, manipulation \nof canoe while we are in it, face to face interactions with multiple individuals \nteen aged and adult, male and female, cloaked and not cloaked, \nand vocalizations like drops of water. Truly amazing stories.
\n\n\n\n\n\n\n\nAudio is attached to this post.
", "date" : "dt:2025-05-07 13:23:00", "extension" : {"mp3", "jpg"}, - "filename" : {"dttr-243-sasquatch-part1", "38cba130-3a31-4d8d-b326-7e5d3704801f"}, + "filename" : {"dttr-243-sasquatch-part1", "yt-243-pt1"}, "id" : {0, 4627253}, "num" : range(1, 2), "post_id" : 1851025,