diff --git a/api/index.js b/api/index.js index 431d0fa..1fc718e 100644 --- a/api/index.js +++ b/api/index.js @@ -59,7 +59,7 @@ function getSuccess(data, res) { app.get('/api', (req, res) => { const pn = req.query.pn || "1"; - const ps = req.query.ps || "20"; + const ps = req.query.ps || "12"; const vmid = req.query.vmid; const userCookie = "SESSDATA=" + (process.env.COOKIES || "No cookies."); let URL = new Url(); diff --git a/dist/bilibili-bangumi.js b/dist/bilibili-bangumi.js index 480dd33..8703c5d 100644 --- a/dist/bilibili-bangumi.js +++ b/dist/bilibili-bangumi.js @@ -1 +1 @@ -/*! Bilibili-Bangumi-JS v1.0.2 | Hans362 (https://hans362.cn) | https://bilibili-bangumi-js.vercel.app | MIT License */"use strict";var bangumiJson=(apiUrl||"https://bilibili-bangumi-js.vercel.app/api")+"?vmid="+userId+"&token="+(new Date).getTime()+Math.random();function getPage(t){$.getJSON(bangumiJson+"&pn="+t,function(e){1==t?$(".bgm-collection").empty():$(".bgm-navigator").remove(),$.each(e.data.list,function(e,t){var a=0;t.is_finish?a=t.total_count:t.is_started&&"即将开播"!=t.new_ep.index_show?(a=t.new_ep.title,$.isNumeric(a)||(a=t.total_count)):a=0,a<0&&(a=0);var i=0;t.is_started?0<=t.progress.indexOf("已看完")?i=a:void 0!==t.progress&&-1==t.progress.indexOf("PV")?(i=t.progress.substring(t.progress.indexOf("第")+1,t.progress.indexOf("话")),$.isNumeric(i)||(i=a)):i=0:i=0;var s=i/a*100,n=t.cover.replace("http","https");$(".bgm-collection").append('\n \n \n \n '+t.title+'\n '+t.evaluate+'\n \n \n 进度:'+i+" / "+a+"\n \n \n \n ")}),t\n 加载更多\n \n ')})}getPage(1); \ No newline at end of file +/*! Bilibili-Bangumi-JS v1.0.2 | Hans362 (https://hans362.cn) | https://bilibili-bangumi-js.vercel.app | MIT License */"use strict";var bangumiJson=(apiUrl||"https://bilibili-bangumi-js.vercel.app/api")+"?vmid="+userId+"&token="+(new Date).getTime()+Math.random();function getPage(t){$.getJSON(bangumiJson+"&pn="+t,function(e){1==t?$(".bgm-collection").empty():$(".bgm-navigator").remove(),$.each(e.data.list,function(e,t){var a=0;t.is_finish?a=t.total_count:t.is_started&&"即将开播"!=t.new_ep.index_show?(a=t.new_ep.title,$.isNumeric(a)||(a=t.total_count)):a=0,a<0&&(a=0);var i=0;t.is_started?0<=t.progress.indexOf("已看完")?i=a:void 0!==t.progress&&-1==t.progress.indexOf("PV")?(i=t.progress.substring(t.progress.indexOf("第")+1,t.progress.indexOf("话")),$.isNumeric(i)||(i=a)):i=0:i=0;var s=i/a*100,n=t.cover.replace("http","https");$(".bgm-collection").append('\n \n \n \n '+t.title+'\n '+t.evaluate+'\n \n \n 进度:'+i+" / "+a+"\n \n \n \n ")}),t\n 加载更多\n \n ')})}getPage(1); \ No newline at end of file diff --git a/src/bilibili-bangumi.js b/src/bilibili-bangumi.js index d29a521..c28df41 100644 --- a/src/bilibili-bangumi.js +++ b/src/bilibili-bangumi.js @@ -45,7 +45,7 @@ function getPage(pageNum) { `) }); - if (pageNum < Math.ceil(data.data.total / 20)) { + if (pageNum < Math.ceil(data.data.total / 12)) { $(".bgm-container").append(` 加载更多 @@ -55,4 +55,4 @@ function getPage(pageNum) { }); } -getPage(1); \ No newline at end of file +getPage(1);