UNPKG

rsshub

Version:
32 lines (31 loc) 888 B
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs"; import { t as parseDate } from "./parse-date-CjhZE69i.mjs"; import { load } from "cheerio"; //#region lib/routes/hainanu/ssszs.ts const route = { path: "/ssszs", categories: ["university"], example: "/hainanu/ssszs", name: "硕士研究生招生动态", maintainers: ["OdinZhang"], handler }; async function handler() { const url = "https://gs.hainanu.edu.cn/yjszs/ssszs.htm"; const $ = load(await rofetch(url)); return { title: "海南大学研究生招生", link: url, description: "海南大学研究生招生公告", item: $(".m_new13>ul>li").toArray().map((item) => { const $item = $(item); return { title: $item.find("a").text(), link: new URL($item.find("a").attr("href"), url).href, pubDate: parseDate($item.find("span").text(), "YYYY-MM-DD") }; }) }; } //#endregion export { route };