bugfixes and improvements

This commit is contained in:
orangecoding
2026-06-13 14:02:42 +02:00
parent 94384df36d
commit 9207280ab4
12 changed files with 32 additions and 21 deletions

View File

@@ -19,7 +19,7 @@ function normalize(o) {
const [city = '', part = ''] = (o.description || '').split('-').map((v) => v.trim());
const address = `${part}, ${city}`;
return {
id: o.link.split('/').pop(),
id: o.link != null ? o.link.split('/').pop() : null,
link: o.link,
title: o.title || '',
price: extractNumber(o.price),
@@ -38,7 +38,7 @@ function normalize(o) {
function applyBlacklist(o) {
const titleNotBlacklisted = !utils.isOneOf(o.title, appliedBlackList);
const descNotBlacklisted = !utils.isOneOf(o.description, appliedBlackList);
return o.id != null && o.title != null && titleNotBlacklisted && descNotBlacklisted && o.link.startsWith(o.link);
return o.id != null && o.title != null && o.link != null && titleNotBlacklisted && descNotBlacklisted;
}
/** @type {ProviderConfig} */