debug(pl24): TEMP Hyundai illustration rows + td dump

This commit is contained in:
2026-07-05 09:55:30 +03:00
parent 05951f9853
commit 6bbc32d9c6

View File

@@ -3633,15 +3633,22 @@ export class PL24FordLegacyService {
const groups: PL24DecodedCategory[] = [];
const seen = new Set<string>();
// TEMP DEBUG (katalogJob Faz 2): dump raw Hyundai/Kia illustration-listing
// HTML to see whether the row carries a description next to the figure code.
// TEMP DEBUG (katalogJob Faz 2): dump the Hyundai/Kia illustration rows
// (subGroup=/image-board), showing every <td> so we can see whether a
// description sits next to the figure code.
if (/hyundai|kia/i.test(serviceName)) {
const rows = html
.split(/<tr\s/)
.filter((s) => s.includes("tc-data-row"))
.slice(0, 6)
.map((s) => s.replace(/\s+/g, " ").slice(0, 400));
this.logger.warn(`[hyundai-debug] ${serviceName} rows: ${JSON.stringify(rows)}`);
.filter((s) => s.includes("tc-data-row") && /subGroup=|image-board/.test(s))
.slice(0, 5)
.map((s) => {
const tds = [...s.matchAll(/<td[^>]*>([\s\S]*?)<\/td>/g)].map((m) =>
m[1].replace(/<[^>]+>/g, "·").replace(/&nbsp;/g, " ").replace(/\s+/g, " ").trim(),
);
const cap = s.match(/caption="([^"]*)"/)?.[1] ?? "";
return { caption: cap, tds };
});
this.logger.warn(`[hyundai-debug2] ${serviceName} illus rows: ${JSON.stringify(rows)}`);
}
const config = getServiceConfig(serviceName);