rsshub
Version:
Make RSS Great Again!
20 lines (18 loc) • 764 B
JavaScript
import { n as init_esm_shims, t as __dirname } from "./esm-shims-CzJ_djXG.mjs";
import { t as art } from "./render-BQo6B4tL.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import path from "node:path";
import { load } from "cheerio";
//#region lib/routes/cnki/utils.ts
init_esm_shims();
const ProcessItem = async (item) => {
const $ = load((await got_default(item.link)).data);
item.description = art(path.join(__dirname, "templates/desc-ffba0d62.art"), {
author: $("h3.author > span").toArray().map((item$1) => $(item$1).text()).join(" "),
company: $("a.author").toArray().map((item$1) => $(item$1).text()).join(" "),
content: $("div.row > span.abstract-text").parent().text()
});
return item;
};
//#endregion
export { ProcessItem as t };