From e788e9a94ba47a7347ac3b5cd7741498ea49740b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E5=A4=A9=E8=A1=8C?= <73741454+Lu-Tianxing@users.noreply.github.com> Date: Wed, 29 Jan 2025 00:51:09 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=E4=BF=AE=E5=A4=8D"=E6=AF=8F=E6=97=A5?= =?UTF-8?q?=E6=96=B0=E9=97=BB=E4=B8=8E=E5=8E=86=E5=8F=B2=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E4=BB=8A=E5=A4=A9=E4=B8=8E=E6=91=B8=E9=B1=BC=E4=BA=BA=E6=97=A5?= =?UTF-8?q?=E5=8E=86.js"=E7=9A=84=E6=AF=8F=E6=97=A5=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更换了失效的API --- ...\261\274\344\272\272\346\227\245\345\216\206.js" | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git "a/scripts/\345\250\261\344\271\220\345\220\221/\346\257\217\346\227\245\346\226\260\351\227\273\344\270\216\345\216\206\345\217\262\344\270\212\347\232\204\344\273\212\345\244\251\344\270\216\346\221\270\351\261\274\344\272\272\346\227\245\345\216\206.js" "b/scripts/\345\250\261\344\271\220\345\220\221/\346\257\217\346\227\245\346\226\260\351\227\273\344\270\216\345\216\206\345\217\262\344\270\212\347\232\204\344\273\212\345\244\251\344\270\216\346\221\270\351\261\274\344\272\272\346\227\245\345\216\206.js" index 0dddc40..0bb79d6 100644 --- "a/scripts/\345\250\261\344\271\220\345\220\221/\346\257\217\346\227\245\346\226\260\351\227\273\344\270\216\345\216\206\345\217\262\344\270\212\347\232\204\344\273\212\345\244\251\344\270\216\346\221\270\351\261\274\344\272\272\346\227\245\345\216\206.js" +++ "b/scripts/\345\250\261\344\271\220\345\220\221/\346\257\217\346\227\245\346\226\260\351\227\273\344\270\216\345\216\206\345\217\262\344\270\212\347\232\204\344\273\212\345\244\251\344\270\216\346\221\270\351\261\274\344\272\272\346\227\245\345\216\206.js" @@ -1,14 +1,14 @@ // ==UserScript== // @name 每日新闻与历史上的今天与摸鱼人日历 // @author 陆天行 -// @version 1.0.2 +// @version 1.0.3 // @description “.今日新闻”返回每日新闻,“.历史上的今天”返回历史上的今天,“.摸鱼人日历”返回摸鱼人日历,本脚本修改自sealdice官方脚本仓库托管星尘的每日新闻与历史上的今天,本人更换了可用的API并添加了摸鱼人日历功能 -// @timestamp 1728716479 +// @timestamp 1738082743 // @license Apache-2 // @homepageURL https://github.com/sealdice/javascript // ==/UserScript== if (!seal.ext.find("DailyInfoByLTX")) { - const ext = seal.ext.new("DailyInfoByLTX", "陆天行", "1.0.2"); + const ext = seal.ext.new("DailyInfoByLTX", "陆天行", "1.0.3"); const cmdNewsToday = seal.ext.newCmdItemInfo(); cmdNewsToday.name = "今日新闻"; cmdNewsToday.help = "可用.今日新闻 调用,API爆炸请发邮件给ci_tfee_lutianxing@163.com"; @@ -21,7 +21,7 @@ if (!seal.ext.find("DailyInfoByLTX")) { return ret; } default: { - let url = "https://api.jun.la/60s.php?format=imgapi"; + let url = "https://api.03c3.cn/api/zb?type=jsonImg"; // 发送 GET 请求 fetch(url) .then((response) => { @@ -37,7 +37,8 @@ if (!seal.ext.find("DailyInfoByLTX")) { //返回数据转换为json对象以可以访问 let imgJson = JSON.parse(data); // 使用[""]方式访问json对象中的tp项 - let imgUrl = imgJson["imageBaidu"]; + let index = imgJson["data"]; + let imgUrl = index["imageurl"]; // 拼装返回的图片消息 let messageRet = "[CQ:image,file="+imgUrl+",cache=0]"; // 发出去 @@ -67,7 +68,7 @@ if (!seal.ext.find("DailyInfoByLTX")) { seal.replyToSender( ctx, msg, - `[CQ:image,file=https://xiaoapi.cn/API/lssdjt_pic.php]` + `[CQ:image,file=https://xiaoapi.cn/API/lssdjt_pic.php,cache=0]` ); return seal.ext.newCmdExecuteResult(true); }