fixed title extra info
This commit is contained in:
@@ -40,7 +40,7 @@ export function extractMetadata(
|
|||||||
const soup = load(html);
|
const soup = load(html);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
title = soup("title").text() || undefined;
|
title = soup("title").first().text().trim() || undefined;
|
||||||
description = soup('meta[name="description"]').attr("content") || undefined;
|
description = soup('meta[name="description"]').attr("content") || undefined;
|
||||||
|
|
||||||
// Assuming the language is part of the URL as per the regex pattern
|
// Assuming the language is part of the URL as per the regex pattern
|
||||||
|
|||||||
Reference in New Issue
Block a user