diff --git a/backend/src/tools/koepi/routes.js b/backend/src/tools/koepi/routes.js index b9788f6..b1125fa 100644 --- a/backend/src/tools/koepi/routes.js +++ b/backend/src/tools/koepi/routes.js @@ -195,8 +195,9 @@ async function scrapeProspekte() { const nextData = extractNextData(body); if (!nextData) continue; - const contents = nextData.props?.pageProps?.pageInformation?.template?.content?.shelfContents?.contents - || nextData.props?.pageProps?.shelfContents?.contents + const pp = nextData.props?.pageProps; + const contents = pp?.pageInformation?.template?.content?.shelfContents?.contents + || pp?.shelfContents?.contents || []; for (const item of contents) {