Skip to main content
Module

x/rss/dev.ts

📰 Deno module for deserializing RSS or ATOM XML feeds into typed objects
Very Popular
Go to Latest
File
import { parseFeed } from "./mod.ts";import { isValidURL } from "./src/util.ts";
const arg0 = Deno.args[0];let xml: string;if (isValidURL(arg0)) { const response = await fetch(arg0); xml = await response.text();} else { xml = await Deno.readTextFile(`./samples/${(arg0 || "rss2")}.xml`);}
const feed = await parseFeed(xml);console.log("\n", "⭐============ RESULT ============⭐", "\n", feed);