From 7672a750cb74bf31e21d76aad2776367fd476155 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 26 May 2025 06:45:53 -0400 Subject: New upstream version 1.29.7. --- gallery_dl/extractor/subscribestar.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'gallery_dl/extractor/subscribestar.py') diff --git a/gallery_dl/extractor/subscribestar.py b/gallery_dl/extractor/subscribestar.py index 1054a63..a83f2da 100644 --- a/gallery_dl/extractor/subscribestar.py +++ b/gallery_dl/extractor/subscribestar.py @@ -40,8 +40,14 @@ class SubscribestarExtractor(Extractor): for post_html in self.posts(): media = self._media_from_post(post_html) data = self._data_from_post(post_html) - data["title"] = text.unescape(text.extr( - data["content"], "

", "

")) + + content = data["content"] + if "" in content: + data["content"] = content = text.extr( + content, "", "") + data["title"] = text.unescape( + text.rextract(content, "

", "

")[0] or "") + yield Message.Directory, data for num, item in enumerate(media, 1): item.update(data) @@ -189,7 +195,12 @@ class SubscribestarExtractor(Extractor): "author_nick": text.unescape(extr('>', '<')), "date" : self._parse_datetime(extr( 'class="post-date">', '")[2]), - "content" : extr('', '').strip(), + "content" : extr( + '
', + '
', + '
'), '?tag=', '"')), } def _parse_datetime(self, dt): @@ -243,7 +254,12 @@ class SubscribestarPostExtractor(SubscribestarExtractor): "post_id" : text.parse_int(extr('data-id="', '"')), "date" : self._parse_datetime(extr( '
', '<')), - "content" : extr('', '').strip(), + "content" : extr( + '
', + '
', + '
'), '?tag=', '"')), "author_name": text.unescape(extr( 'class="star_link" href="/', '"')), "author_id" : text.parse_int(extr('data-user-id="', '"')), -- cgit v1.2.3