rsshub
Version:
Make RSS Great Again!
43 lines (41 loc) • 1.21 kB
JavaScript
import "./dist-Bog6z_OM.mjs";
import "./config-MQ-7ebJ_.mjs";
import { t as ViewType } from "./types-gOySfSXJ.mjs";
import "./logger-C4avouvV.mjs";
import { t as ofetch_default } from "./ofetch-DKl_Ma9g.mjs";
import { load } from "cheerio";
//#region lib/routes/podwise/collections.ts
const route = {
path: "/explore",
categories: ["multimedia"],
view: ViewType.Audios,
example: "/podwise/explore",
radar: [{ source: ["podwise.ai", "podwise.ai/explore"] }],
name: "Collections",
maintainers: ["lyling"],
handler: async () => {
const link = "https://podwise.ai/explore";
const $ = load(await ofetch_default(link));
const content = $("#navigator").next();
const collectinDescription = content.find("p").eq(1).text();
const items = content.find(".group").toArray().map((item) => {
item = $(item);
const title = item.find("a").first().text();
const link = item.find("a").first().attr("href");
const description = item.find("p").first().text();
return {
title,
link: `https://podwise.ai${link}`,
description
};
});
return {
title: $("title").text(),
description: collectinDescription,
item: items,
link
};
}
};
//#endregion
export { route };