rsshub
Version:
Make RSS Great Again!
54 lines (52 loc) • 1.83 kB
JavaScript
import { n as init_esm_shims, t as __dirname } from "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import "./helpers-DxBp0Pty.mjs";
import { t as art } from "./render-BQo6B4tL.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import path from "node:path";
//#region lib/routes/ikea/gb/new.ts
init_esm_shims();
const route = {
path: "/gb/new",
categories: ["shopping"],
example: "/ikea/gb/new",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["ikea.com/gb/en/new/new-products/", "ikea.com/"] }],
name: "UK - New Product Release",
maintainers: ["HenryQW"],
handler,
url: "ikea.com/gb/en/new/new-products/"
};
async function handler() {
const link = "https://www.ikea.com/gb/en/new/new-products/";
const { data: { specialPage } } = await got_default("https://sik.search.blue.cdtapps.com/gb/en/special", { searchParams: { special: "new_product" } });
const { data: { moreProducts: { productWindow } } } = await got_default("https://sik.search.blue.cdtapps.com/gb/en/special/more-products", { searchParams: {
special: "new_product",
start: 24,
end: specialPage.productCount
} });
return {
title: "New Products - Browse All New Furniture & Home Decor - IKEA",
link,
description: "New products released by IKEA UK.",
item: [...specialPage.productWindow, ...productWindow].map((p) => ({
title: `${p.name} ${p.typeName}, ${p.itemMeasureReferenceText}`,
description: art(path.join(__dirname, "templates/new-9a813cf6.art"), { p }),
link: p.pipUrl,
category: p.categoryPath.map((c) => c.name)
}))
};
}
//#endregion
export { route };