rsshub
Version:
Make RSS Great Again!
36 lines (35 loc) • 1.11 kB
JavaScript
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/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 response = await rofetch(link);
const $ = load(response);
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 };