Back

Version 219

9/13/2024
import { basicCss } from "https://esm.town/v/easrng/basicCss";
import { upgradeExpress } from "https://esm.town/v/easrng/upgradeExpress";
import { type Component } from "npm:@easrng/elements@0.1.15";
import { stream } from "npm:@easrng/elements@0.1.15/server";
import { parseHTML } from "npm:linkedom@0.18.4";
const { document, Node } = parseHTML(`<!DOCTYPE html>`);
import { cohostSanitize } from "https://esm.town/v/easrng/cohostSanitize";
import { extractFromJson, extractFromXml } from "https://esm.town/v/easrng/patchedFeedExtractor";
import TimeAgo from "npm:javascript-time-ago";
import en from "npm:javascript-time-ago/locale/en";
TimeAgo.addDefaultLocale(en);
const timeAgo = new TimeAgo("en");
interface FeedEntry {
id: string;
link?: string;
title?: string;
htmlContent?: string;
published?: Date;
}
interface FeedData {
link?: string;
title?: string;
description?: string;
generator?: string;
language?: string;
published?: Date;
entries?: Array<FeedEntry>;
error?: true;
url: string;
}
const extract = async (url, options = {}, fetchOptions = {}) => {
const retrieve_default = async (url, options: any = {}) => {
const {
headers = {
"user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0",
},
easrng-rssviewer.web.val.run
Updated: September 13, 2024