Skip to content

Commit 78a10b7

Browse files
committed
Indexer: Use promoted date only if thread has typo or is outdated
1 parent b252317 commit 78a10b7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

indexer/scraper.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ async def thread(id: int) -> dict[str, str] | f95zone.IndexerError | None:
127127
parser.attachment(preview_url)
128128
for preview_url in update["screens"]
129129
] or ret.previews_urls
130-
ret.last_updated = parser.datestamp(update["ts"])
130+
last_promoted = parser.datestamp(update["ts"])
131+
if (
132+
ret.last_updated > time.time() # Only if thread has a typo
133+
or last_promoted > ret.last_updated # Or it's outdated
134+
):
135+
ret.last_updated = last_promoted
131136
break
132137
else: # Didn't break
133138
continue

0 commit comments

Comments
 (0)