From 5b5b3b1b184a45ef11e7e3acac00cba88f4bd3d8 Mon Sep 17 00:00:00 2001 From: Theo Sun Date: Thu, 8 Aug 2024 21:32:56 +0800 Subject: [PATCH] chore: update --- lib/customize/qbitai/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/customize/qbitai/index.js b/lib/customize/qbitai/index.js index bb32516c242b86..b9ce7b8220e88d 100644 --- a/lib/customize/qbitai/index.js +++ b/lib/customize/qbitai/index.js @@ -13,10 +13,9 @@ const endpoint = createGenericEndpoint({ const title = trimEnd($("title").text(), " | 量子位"); const pubDate = moment(`${date} ${time}`, "YYYY-MM-DD HH:mm:ss").toISOString(); const article = $("article, .article"); - article.find("h1").remove(); - article.find(".article_info").remove(); - article.find(".zhaiyao").remove(); - article.find("blockquote").remove(); + for (const element of ["h1", ".article_info", ".zhaiyao", "blockquote"]) { + article.find(element).remove(); + } const description = article.html().trim(); return { title, pubDate, author, description }; },