summaryrefslogtreecommitdiffstats
path: root/gallery_dl/extractor/piczel.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/extractor/piczel.py')
-rw-r--r--gallery_dl/extractor/piczel.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/gallery_dl/extractor/piczel.py b/gallery_dl/extractor/piczel.py
index 968776b..6661e7d 100644
--- a/gallery_dl/extractor/piczel.py
+++ b/gallery_dl/extractor/piczel.py
@@ -26,14 +26,13 @@ class PiczelExtractor(Extractor):
def items(self):
for post in self.posts():
post["tags"] = [t["title"] for t in post["tags"] if t["title"]]
- post["date"] = text.parse_datetime(
- post["created_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
+ post["date"] = self.parse_datetime_iso(post["created_at"])
if post["multi"]:
images = post["images"]
del post["images"]
post["count"] = len(images)
- yield Message.Directory, post
+ yield Message.Directory, "", post
for post["num"], image in enumerate(images):
if "id" in image:
del image["id"]
@@ -43,7 +42,7 @@ class PiczelExtractor(Extractor):
else:
post["count"] = 1
- yield Message.Directory, post
+ yield Message.Directory, "", post
post["num"] = 0
url = post["image"]["url"]
yield Message.Url, url, text.nameext_from_url(url, post)
@@ -67,7 +66,7 @@ class PiczelExtractor(Extractor):
class PiczelUserExtractor(PiczelExtractor):
"""Extractor for all images from a user's gallery"""
subcategory = "user"
- pattern = BASE_PATTERN + r"/gallery/([^/?#]+)/?$"
+ pattern = rf"{BASE_PATTERN}/gallery/([^/?#]+)/?$"
example = "https://piczel.tv/gallery/USER"
def posts(self):
@@ -80,7 +79,7 @@ class PiczelFolderExtractor(PiczelExtractor):
subcategory = "folder"
directory_fmt = ("{category}", "{user[username]}", "{folder[name]}")
archive_fmt = "f{folder[id]}_{id}_{num}"
- pattern = BASE_PATTERN + r"/gallery/(?!image/)[^/?#]+/(\d+)"
+ pattern = rf"{BASE_PATTERN}/gallery/(?!image/)[^/?#]+/(\d+)"
example = "https://piczel.tv/gallery/USER/12345"
def posts(self):
@@ -91,7 +90,7 @@ class PiczelFolderExtractor(PiczelExtractor):
class PiczelImageExtractor(PiczelExtractor):
"""Extractor for individual images"""
subcategory = "image"
- pattern = BASE_PATTERN + r"/gallery/image/(\d+)"
+ pattern = rf"{BASE_PATTERN}/gallery/image/(\d+)"
example = "https://piczel.tv/gallery/image/12345"
def posts(self):