UNPKG

rsshub

Version:
69 lines (67 loc) 1.82 kB
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import "./ofetch-BIyrKU3Y.mjs"; import { t as parseDate } from "./parse-date-BrP7mxXf.mjs"; import "./md5-C8GRvctM.mjs"; import { t as cache_default } from "./cache-Bo__VnGm.mjs"; import "./helpers-DxBp0Pty.mjs"; import "./render-BQo6B4tL.mjs"; import { t as got_default } from "./got-KxxWdaxq.mjs"; import { n as ProcessForm, t as ProcessFeed } from "./utils-BUSYJPIj.mjs"; //#region lib/routes/lfsyd/home.ts const route = { path: "/home", categories: ["game"], example: "/lfsyd/home", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["www.iyingdi.com/"] }], name: "首页", maintainers: ["auto-bot-ty"], handler, url: "www.iyingdi.com/" }; async function handler() { const rootUrl = "https://www.iyingdi.com"; const url = "https://api.iyingdi.com/mweb/feed/recommend-content-list"; const form = { size: 30, timestamp: "" }; const { posts } = (await got_default({ method: "post", url, headers: { "App-Udid": "unknown", Host: "api.iyingdi.com", "Login-Token": "nologin", Origin: "https://mob.iyingdi.com", Platform: "mweb", Preid: "86f2007de00272e24a54831a621aecc5", Referer: "https://mob.iyingdi.com/" }, form: ProcessForm(form, "mweb") })).data; return { title: "首页 - 旅法师营地", link: rootUrl, item: await ProcessFeed(cache_default, posts.map((item) => ({ title: item.post.title, pubDate: parseDate(item.post.show_time * 1e3), link: `${rootUrl}/tz/post/${item.post.id}`, guid: item.post.title, postId: item.post.id }))) }; } //#endregion export { route };