fixed title extra info

This commit is contained in:
rafaelmmiller 2024-12-19 08:32:10 -03:00
parent 066071cd54
commit cf2ec77131

View File

@ -40,7 +40,7 @@ export function extractMetadata(
const soup = load(html);
try {
title = soup("title").text() || undefined;
title = soup("title").first().text().trim() || undefined;
description = soup('meta[name="description"]').attr("content") || undefined;
// Assuming the language is part of the URL as per the regex pattern