aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/rule34xyz.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-12-20 05:49:04 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2025-12-20 05:49:04 -0500
commita24ec1647aeac35a63b744ea856011ad6e06be3b (patch)
treeae94416de786aeddd05d99559098f7f16bb103a6 /gallery_dl/extractor/rule34xyz.py
parent33f8a8a37a9cba738ef25fb99955f0730da9eb48 (diff)
New upstream version 1.31.1.upstream/1.31.1
Diffstat (limited to 'gallery_dl/extractor/rule34xyz.py')
-rw-r--r--gallery_dl/extractor/rule34xyz.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/gallery_dl/extractor/rule34xyz.py b/gallery_dl/extractor/rule34xyz.py
index 05915ba..ddd656f 100644
--- a/gallery_dl/extractor/rule34xyz.py
+++ b/gallery_dl/extractor/rule34xyz.py
@@ -68,8 +68,7 @@ class Rule34xyzExtractor(BooruExtractor):
def _prepare(self, post):
post.pop("files", None)
- post["date"] = text.parse_datetime(
- post["created"], "%Y-%m-%dT%H:%M:%S.%fZ")
+ post["date"] = self.parse_datetime_iso(post["created"])
post["filename"], _, post["format"] = post["filename"].rpartition(".")
if "tags" in post:
post["tags"] = [t["value"] for t in post["tags"]]
@@ -135,7 +134,7 @@ class Rule34xyzExtractor(BooruExtractor):
class Rule34xyzPostExtractor(Rule34xyzExtractor):
subcategory = "post"
archive_fmt = "{id}"
- pattern = BASE_PATTERN + r"/post/(\d+)"
+ pattern = rf"{BASE_PATTERN}/post/(\d+)"
example = "https://rule34.xyz/post/12345"
def posts(self):
@@ -146,7 +145,7 @@ class Rule34xyzPlaylistExtractor(Rule34xyzExtractor):
subcategory = "playlist"
directory_fmt = ("{category}", "{playlist_id}")
archive_fmt = "p_{playlist_id}_{id}"
- pattern = BASE_PATTERN + r"/playlists/view/(\d+)"
+ pattern = rf"{BASE_PATTERN}/playlists/view/(\d+)"
example = "https://rule34.xyz/playlists/view/12345"
def metadata(self):
@@ -161,7 +160,7 @@ class Rule34xyzTagExtractor(Rule34xyzExtractor):
subcategory = "tag"
directory_fmt = ("{category}", "{search_tags}")
archive_fmt = "t_{search_tags}_{id}"
- pattern = BASE_PATTERN + r"/([^/?#]+)$"
+ pattern = rf"{BASE_PATTERN}/([^/?#]+)$"
example = "https://rule34.xyz/TAG"
def metadata(self):