diff --git a/routes/36kr.js b/routes/36kr.js index f6e879f..06375db 100644 --- a/routes/36kr.js +++ b/routes/36kr.js @@ -66,6 +66,8 @@ krRouter.get("/36kr", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "36氪", + subtitle: "热榜", message: "获取失败", }; } @@ -120,6 +122,8 @@ krRouter.get("/36kr/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "36氪", + subtitle: "热榜", message: "获取失败", }; } diff --git a/routes/baidu.js b/routes/baidu.js index 26939b6..8722f04 100644 --- a/routes/baidu.js +++ b/routes/baidu.js @@ -54,6 +54,8 @@ baiduRouter.get("/baidu", async (ctx) => { if (!data) { ctx.body = { code: 500, + title: "百度", + subtitle: "热搜榜", message: "获取失败", }; return false; @@ -123,6 +125,8 @@ baiduRouter.get("/baidu/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "百度", + subtitle: "热搜榜", message: "获取失败", }; } diff --git a/routes/bilibili.js b/routes/bilibili.js index ec6b201..2bfbb56 100644 --- a/routes/bilibili.js +++ b/routes/bilibili.js @@ -61,6 +61,8 @@ bilibiliRouter.get("/bilibili", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "哔哩哔哩", + subtitle: "热门榜", message: "哔哩哔哩热门榜获取失败", }; } @@ -109,7 +111,9 @@ bilibiliRouter.get("/bilibili/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, - message: "哔哩哔哩热门榜获取失败", + title: "哔哩哔哩", + subtitle: "热门榜", + message: "获取失败", }; } } diff --git a/routes/ithome.js b/routes/ithome.js index f85aa1d..5cb352f 100644 --- a/routes/ithome.js +++ b/routes/ithome.js @@ -36,6 +36,7 @@ const getData = (data) => { .load(newListHtml)(".placeholder") .get() .map((v) => { + console.log($(v)); dataList.push({ title: $(v).find(".plc-title").text(), img: $(v).find("img").attr("data-original"), @@ -98,6 +99,8 @@ itHomeRouter.get("/ithome", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "IT之家", + subtitle: "热榜", message: "获取失败", }; } @@ -146,6 +149,8 @@ itHomeRouter.get("/ithome/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "IT之家", + subtitle: "热榜", message: "获取失败", }; } diff --git a/routes/juejin.js b/routes/juejin.js index 8c71ee8..18cda81 100644 --- a/routes/juejin.js +++ b/routes/juejin.js @@ -58,6 +58,8 @@ juejinRouter.get("/juejin", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "稀土掘金", + subtitle: "热榜", message: "获取失败", }; } @@ -106,6 +108,8 @@ juejinRouter.get("/juejin/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "稀土掘金", + subtitle: "热榜", message: "获取失败", }; } diff --git a/routes/newsqq.js b/routes/newsqq.js index 955891b..f61d4a9 100644 --- a/routes/newsqq.js +++ b/routes/newsqq.js @@ -60,6 +60,8 @@ newsqqRouter.get("/newsqq", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "腾讯新闻", + subtitle: "热点榜", message: "获取失败", }; } @@ -108,6 +110,8 @@ newsqqRouter.get("/newsqq/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "腾讯新闻", + subtitle: "热点榜", message: "获取失败", }; } diff --git a/routes/sspai.js b/routes/sspai.js index 835453c..74f0944 100644 --- a/routes/sspai.js +++ b/routes/sspai.js @@ -60,6 +60,8 @@ sspaiRouter.get("/sspai", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "少数派", + subtitle: "最热", message: "获取失败", }; } @@ -108,6 +110,8 @@ sspaiRouter.get("/sspai/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "少数派", + subtitle: "最热", message: "获取失败", }; } diff --git a/routes/thepaper.js b/routes/thepaper.js index 0b37c9f..7f28e91 100644 --- a/routes/thepaper.js +++ b/routes/thepaper.js @@ -59,6 +59,8 @@ thepaperRouter.get("/thepaper", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "澎湃新闻", + subtitle: "热榜", message: "获取失败", }; } @@ -107,6 +109,8 @@ thepaperRouter.get("/thepaper/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "澎湃新闻", + subtitle: "热榜", message: "获取失败", }; } diff --git a/routes/tieba.js b/routes/tieba.js index 52f2235..fd73bf1 100644 --- a/routes/tieba.js +++ b/routes/tieba.js @@ -59,6 +59,8 @@ tiebaRouter.get("/tieba", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "百度贴吧", + subtitle: "热议榜", message: "获取失败", }; } @@ -107,6 +109,8 @@ tiebaRouter.get("/tieba/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "百度贴吧", + subtitle: "热议榜", message: "获取失败", }; } diff --git a/routes/toutiao.js b/routes/toutiao.js index 657136a..eeb2842 100644 --- a/routes/toutiao.js +++ b/routes/toutiao.js @@ -58,6 +58,8 @@ toutiaoRouter.get("/toutiao", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "今日头条", + subtitle: "热榜", message: "获取失败", }; } @@ -106,6 +108,8 @@ toutiaoRouter.get("/toutiao/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "今日头条", + subtitle: "热榜", message: "获取失败", }; } diff --git a/routes/weibo.js b/routes/weibo.js index 50b0ba3..b4b1f1b 100644 --- a/routes/weibo.js +++ b/routes/weibo.js @@ -71,6 +71,8 @@ weiboRouter.get("/weibo", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "微博", + subtitle: "热搜榜", message: "获取失败", }; } @@ -119,6 +121,8 @@ weiboRouter.get("/weibo/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "微博", + subtitle: "热搜榜", message: "获取失败", }; } diff --git a/routes/zhihu.js b/routes/zhihu.js index 6c7606a..d7cbac0 100644 --- a/routes/zhihu.js +++ b/routes/zhihu.js @@ -80,6 +80,8 @@ zhihuRouter.get("/zhihu", async (ctx) => { console.error(error); ctx.body = { code: 500, + title: "知乎", + subtitle: "热榜", message: "获取失败", }; } @@ -128,6 +130,8 @@ zhihuRouter.get("/zhihu/new", async (ctx) => { // 如果缓存中也没有数据,则返回错误信息 ctx.body = { code: 500, + title: "知乎", + subtitle: "热榜", message: "获取失败", }; }