From f18f9d7cf9ea0ff664303445c5a9f12429b80b5b Mon Sep 17 00:00:00 2001 From: imsyy Date: Fri, 17 Mar 2023 11:52:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/baidu.js | 2 +- routes/bilibili.js | 1 + routes/thepaper.js | 1 + routes/zhihu.js | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/routes/baidu.js b/routes/baidu.js index fe87f9f..26939b6 100644 --- a/routes/baidu.js +++ b/routes/baidu.js @@ -25,7 +25,7 @@ const getData = (data) => { title: v.query, desc: v.desc, pic: v.img, - hot: v.hotScore, + hot: Number(v.hotScore), url: `https://www.baidu.com/s?wd=${encodeURIComponent(v.query)}`, mobileUrl: v.url, }); diff --git a/routes/bilibili.js b/routes/bilibili.js index 3c85d00..ec6b201 100644 --- a/routes/bilibili.js +++ b/routes/bilibili.js @@ -23,6 +23,7 @@ const getData = (data) => { pic: v.pic.replace(/http:/, "https:"), owner: v.owner, data: v.stat, + hot: v.stat.view, url: v.short_link, mobileUrl: `https://m.bilibili.com/video/${v.bvid}`, }; diff --git a/routes/thepaper.js b/routes/thepaper.js index 2092aed..0b37c9f 100644 --- a/routes/thepaper.js +++ b/routes/thepaper.js @@ -20,6 +20,7 @@ const getData = (data) => { id: v.contId, title: v.name, pic: v.pic, + hot: v.praiseTimes, time: v.pubTime, url: `https://www.thepaper.cn/newsDetail_forward_${v.contId}`, mobileUrl: `https://m.thepaper.cn/newsDetail_forward_${v.contId}`, diff --git a/routes/zhihu.js b/routes/zhihu.js index 5f6398a..6c7606a 100644 --- a/routes/zhihu.js +++ b/routes/zhihu.js @@ -30,7 +30,7 @@ const getData = (data) => { title: v.target.titleArea.text, desc: v.target.excerptArea.text, pic: v.target.imageArea.url, - hot: v.target.metricsArea.text, + hot: parseInt(v.target.metricsArea.text.replace(/[^\d]/g, "")) * 10000, url: v.target.link.url, mobileUrl: v.target.link.url, });