rsshub
Version:
Make RSS Great Again!
34 lines (33 loc) • 1.05 kB
JavaScript
import { t as parseDate } from "./parse-date-3kcy2Eau.mjs";
import { t as buildData } from "./common-config-DW8ZWC5w.mjs";
//#region lib/routes/stratechery/index.ts
const route = {
path: "/",
categories: ["blog"],
example: "/stratechery",
name: "Blog",
maintainers: ["chazeon"],
handler
};
async function handler() {
const link = "https://stratechery.com/";
return await buildData({
link,
url: link,
title: "Stratechery by Ben Thompson",
author: "Ben Thompson",
description: "Stratechery provides analysis of the strategy and business side of technology and media, and the impact of technology on society. ",
item: {
item: "article",
title: ($) => $("article > header > h1 > a").text(),
link: ($) => $("article > header > h1 > a").attr("href"),
pubDate: ($) => {
const datetime = $("article .entry-date").attr("datetime");
return datetime ? parseDate(datetime) : void 0;
},
description: ($) => $("article > .entry-content").html().replaceAll("%", "%")
}
});
}
//#endregion
export { route };