From 07a0b81b08ae1d9917d87ba977df938b7cdb7b9c Mon Sep 17 00:00:00 2001 From: PoleTransformer Date: Fri, 13 Mar 2026 20:43:53 -0700 Subject: [PATCH] Add datePublished to json --- endpoint/mh_endpoint.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/endpoint/mh_endpoint.py b/endpoint/mh_endpoint.py index 36a12f01..a0b38e26 100755 --- a/endpoint/mh_endpoint.py +++ b/endpoint/mh_endpoint.py @@ -111,6 +111,9 @@ def do_POST(self): data = base64.b64decode(entry['payload']) timestamp = int.from_bytes(data[0:4], 'big') + 978307200 if (timestamp > startdate): + # Only add datePublished if Apple does not return the key + if not entry.get("datePublished"): + entry["datePublished"] = timestamp newResults[timestamp] = entry sorted_map = OrderedDict(sorted(newResults.items(), reverse=True))