UNPKG

rsshub

Version:
35 lines (34 loc) 962 B
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs"; import { t as parseDate } from "./parse-date-3kcy2Eau.mjs"; import { t as timezone } from "./timezone-UiMFOuvL.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 response = await rofetch(link); const $ = load(response); 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 };