rsshub
Version:
Make RSS Great Again!
53 lines (51 loc) • 1.43 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs";
//#region lib/routes/furaffinity/browse.ts
const route = {
path: "/browse/:mode?",
name: "Browse",
url: "furaffinity.net",
categories: ["social-media"],
example: "/furaffinity/browse/nsfw",
maintainers: ["TigerCubDen", "SkyNetX007"],
parameters: { mode: "R18 content toggle, default value is sfw, options are sfw, nsfw" },
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
nsfw: true
},
radar: [{
source: ["furaffinity.net"],
target: "/browse"
}],
handler
};
async function handler(ctx) {
const { mode = "sfw" } = ctx.req.param();
let url = "https://faexport.spangle.org.uk/browse.json?sfw=1";
if (mode === "nsfw") url = "https://faexport.spangle.org.uk/browse.json";
return {
title: "Fur Affinity | Browse",
link: "https://www.furaffinity.net/browse/",
description: `Fur Affinity Browsing Artwork`,
item: (await ofetch_default(url, {
method: "GET",
headers: { Referer: "https://faexport.spangle.org.uk/" }
})).map((item) => ({
title: item.title,
link: item.link,
guid: item.id,
description: `<img src="${item.thumbnail}">`,
author: item.name
}))
};
}
//#endregion
export { route };