From bcfbefb4bf04ca9a06cf916082375cd0800aa76e Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Thu, 15 Jun 2023 11:15:23 +0200 Subject: [PATCH] Fix tageschau feed time --- src/components/News.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/News.tsx b/src/components/News.tsx index 899a607..53c7a37 100644 --- a/src/components/News.tsx +++ b/src/components/News.tsx @@ -15,7 +15,7 @@ const News = () => { for (const n of news) { if (!n.title || n.title === "") continue; - const updated = new Date(n.updated); + const updated = new Date(n["dc:date"]); newsTable.push( {n.title} @@ -43,7 +43,7 @@ const News = () => { const pullNews = async () => { const xml = new XMLParser(); const response = await fetch("https://www.tagesschau.de/xml/atom/"); - const feed: { title: string; updated: string; }[] = xml.parse(await response.text()).feed.entry; + const feed: { title: string; "dc:date": string; }[] = xml.parse(await response.text()).feed.entry; // Feedburner does not allow cors but at least we get JSON const postResponse = await fetch("https://api.rss2json.com/v1/api.json?rss_url=https%3A%2F%2Ffeeds.feedburner.com%2Fblogspot%2FrkEL");