Skip to content

Commit

Permalink
[subscribestar] fix 'date' metadata (#2642)
Browse files Browse the repository at this point in the history
Handle instances where the actual datetime information
is preceded by "Updated on "
  • Loading branch information
mikf committed Jun 4, 2022
1 parent 46d171c commit 541a61d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions gallery_dl/extractor/subscribestar.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def _data_from_post(self, html):
"author_id" : text.parse_int(extr('data-user-id="', '"')),
"author_name": text.unescape(extr('href="/', '"')),
"author_nick": text.unescape(extr('>', '<')),
"date" : self._parse_datetime(text.remove_html(extr(
'class="post-date">', '</'))),
"date" : self._parse_datetime(extr(
'class="post-date">', '</').rpartition(">")[2]),
"content" : (extr(
'<div class="post-content', '<div class="post-uploads')
.partition(">")[2]),
Expand Down Expand Up @@ -152,8 +152,6 @@ class SubscribestarUserExtractor(SubscribestarExtractor):
"type" : "re:image|video|attachment",
"url" : str,
"?pinned": bool,
"?height": int,
"?width" : int,
},
}),
("https://www.subscribestar.com/subscribestar", {
Expand All @@ -162,8 +160,8 @@ class SubscribestarUserExtractor(SubscribestarExtractor):
"range": "1",
}),
("https://subscribestar.adult/kanashiipanda", {
"range": "21-40",
"count": 20,
"range": "1-10",
"count": 10,
}),
)

Expand Down

0 comments on commit 541a61d

Please sign in to comment.