mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-16 15:26:11 +08:00
fix: description from jsdom
This commit is contained in:
parent
6e05ea2243
commit
1bd3ed7125
@ -137,10 +137,11 @@ export class JSDomControl extends AsyncService {
|
||||
.filter(Boolean);
|
||||
|
||||
const imageSet = new Set(imageTags);
|
||||
|
||||
const r = {
|
||||
...snapshot,
|
||||
title: snapshot.title || jsdom.window.document.title,
|
||||
description: snapshot.description ||
|
||||
(jsdom.window.document.head?.querySelector('meta[name="description"]')?.getAttribute('content') ?? ''),
|
||||
parsed,
|
||||
html: rootDoc.documentElement.outerHTML,
|
||||
text: textChunks.join('\n'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user