summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/philomena.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2024-06-22 21:19:36 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2024-06-22 21:19:36 -0400
commit80e39a8fc7de105510cbbdca8507f2a4b8c9e01d (patch)
treebb5caa2f5fafc5116b8f89e659085ffbd8a918f2 /gallery_dl/extractor/philomena.py
parent1c28712d865e30ed752988ba0b6944882250b665 (diff)
New upstream version 1.27.1.upstream/1.27.1
Diffstat (limited to 'gallery_dl/extractor/philomena.py')
-rw-r--r--gallery_dl/extractor/philomena.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gallery_dl/extractor/philomena.py b/gallery_dl/extractor/philomena.py
index 339646f..150efed 100644
--- a/gallery_dl/extractor/philomena.py
+++ b/gallery_dl/extractor/philomena.py
@@ -24,8 +24,13 @@ class PhilomenaExtractor(BooruExtractor):
def _init(self):
self.api = PhilomenaAPI(self)
+ if not self.config("svg", True):
+ self._file_url = operator.itemgetter("view_url")
- _file_url = operator.itemgetter("view_url")
+ def _file_url(self, post):
+ if post["format"] == "svg":
+ return post["view_url"].rpartition(".")[0] + ".svg"
+ return post["view_url"]
@staticmethod
def _prepare(post):