mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-18 04:25:54 +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);
|
.filter(Boolean);
|
||||||
|
|
||||||
const imageSet = new Set(imageTags);
|
const imageSet = new Set(imageTags);
|
||||||
|
|
||||||
const r = {
|
const r = {
|
||||||
...snapshot,
|
...snapshot,
|
||||||
title: snapshot.title || jsdom.window.document.title,
|
title: snapshot.title || jsdom.window.document.title,
|
||||||
|
description: snapshot.description ||
|
||||||
|
(jsdom.window.document.head?.querySelector('meta[name="description"]')?.getAttribute('content') ?? ''),
|
||||||
parsed,
|
parsed,
|
||||||
html: rootDoc.documentElement.outerHTML,
|
html: rootDoc.documentElement.outerHTML,
|
||||||
text: textChunks.join('\n'),
|
text: textChunks.join('\n'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user