rsshub
Version:
Make RSS Great Again!
35 lines (34 loc) • 1.08 kB
JavaScript
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/keyakizaka46/blog.ts
const route = {
path: "/blog",
categories: ["new-media"],
example: "/keyakizaka46/blog",
name: "Keyakizaka46 Blog 欅坂 46 博客",
maintainers: ["yj-qin"],
handler
};
async function handler() {
const link = "https://www.keyakizaka46.com/s/k46o/diary/member";
const $ = load(await rofetch(link));
return {
allowEmpty: true,
title: "欅坂46官网 博客",
link,
item: $("div.box-newposts div.slider ul li").toArray().map((item) => {
const $item = $(item);
return {
title: $item.find("p.ttl").text().trim(),
link: $item.find("a").attr("href"),
pubDate: timezone(parseDate($item.find("div.box-blog time").text()), 9),
author: $item.find("p.ttl").next().text().trim(),
description: `<img src="${$item.find("img.js-replaceImage").attr("src")}">`
};
})
};
}
//#endregion
export { route };