summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2025-08-08 12:22:00 +0200
committerGitHub <noreply@github.com>2025-08-08 12:22:00 +0200
commit761b74e8c9f67e57c7390354b053eeaede7f25c2 (patch)
tree6cc689a45c97a819aed87ecbb40ab47f494b9ba2 /searx
parentdd170964c70664e2793ceb7e990cf443d9b324ae (diff)
[fix] legacy results: published date missing (#5093)
The `publishedDate` has always been `None` before that change, which causes that there are no `publishedDate`s visible for any result.
Diffstat (limited to 'searx')
-rw-r--r--searx/result_types/_base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/result_types/_base.py b/searx/result_types/_base.py
index c098b1c3a..db81fc8d2 100644
--- a/searx/result_types/_base.py
+++ b/searx/result_types/_base.py
@@ -446,7 +446,7 @@ class LegacyResult(dict):
positions: list[int]
score: float
category: str
- publishedDate: datetime.datetime | None = None
+ publishedDate: datetime.datetime | None
pubdate: str = ""
# infobox result
@@ -476,6 +476,7 @@ class LegacyResult(dict):
self["positions"] = self.get("positions", "")
self["score"] = self.get("score", 0)
self["category"] = self.get("category", "")
+ self["publishedDate"] = self.get("publishedDate")
if "infobox" in self:
self["urls"] = self.get("urls", [])