UNPKG

rsshub

Version:
34 lines (33 loc) 934 B
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs"; import { t as parseDate } from "./parse-date-CjhZE69i.mjs"; import { t as timezone } from "./timezone-DE--ze1V.mjs"; import { load } from "cheerio"; //#region lib/routes/kaoyan/kaoyan.ts const route = { path: "/", categories: ["other"], example: "/kaoyan", name: "考研帮调剂信息", maintainers: ["shengmaosu"], handler }; async function handler() { const link = "https://tiaoji.kaoyan.com/xinxi/"; const $ = load(await rofetch(link)); return { title: "考研帮调剂信息", link, description: "考研帮调剂信息", item: $(".areaZslist li").toArray().slice(0, 10).map((item) => { const $item = $(item); return { title: $item.find("li a").text(), description: $item.find("li a").text(), link: $item.find("li a").attr("href"), pubDate: timezone(parseDate($item.find("em").text()), 8) }; }) }; } //#endregion export { route };