1
2
3
4
5
6
7
8
9
10
11
import { fetch } from "https://esm.town/v/std/fetch";
export async function fetchRssParser(rssUrl) {
// fetch the rss xml
const rssResult = await fetch(rssUrl).then((res) => res.text());
// parse xml to object
const { XMLParser } = await import("npm:fast-xml-parser");
const parser = new XMLParser();
let jObj = parser.parse(rssResult);
return jObj;
}