↩ revert: 退回版本

This commit is contained in:
zhiyu1998 2023-03-12 13:23:21 +08:00
parent da105f4f81
commit e65c8244db
2 changed files with 10 additions and 9 deletions

View File

@ -644,13 +644,14 @@ export class tools extends plugin {
async netease(e) {
const message = e.msg === undefined ? e.message.shift().data.replaceAll("\\", "") : e.msg.trim();
const musicUrlReg = /(http:|https:)\/\/music.163.com\/song\/media\/outer\/url\?id=(\d+)/;
const musicUrl = musicUrlReg.exec(message)
const musicDownloadUrl = musicUrl?.[0]
// 如果存在直接内容
if (musicDownloadUrl) {
const musicJson = JSON.parse(message)
const {musicUrl, preview, title, desc} = musicJson.meta.music
console.log(111);
const musicJson = JSON.parse(message)
const {musicUrl, preview, title, desc} = musicJson.meta.music
// 如果没有下载地址跳出if
if (_.isNull(musicUrl) || _.isUndefined(musicUrl)) {
e.reply(`识别:网易云音乐,官方解析失败,开始执行第三方解析!`);
} else {
// 反之解析官方地址
e.reply([`识别:网易云音乐,${title}--${desc}`, segment.image(preview)]);
await this.downloadMp3(musicUrl, 'follow').then(path => {
Bot.acquireGfs(e.group_id).upload(fs.readFileSync(path), '/', `${title.replace(/[\/\?<>\\:\*\|".… ]/g, '')}.mp3`)

View File

@ -1,10 +1,10 @@
- {
version: 1.0.10,
version: 1.0.9,
data:
[
新增<span class="cmd">网易云小程序解析</span>,
适配<span class="cmd">bilibili小程序解析</span>,
适配<span class="cmd">bilibili小程序解析</span>查询,
增加<span class="cmd">#搜书</span>查询,
增加<span class="cmd">#青年大学习</span>查询,
适配<span class="cmd">锅巴</span>插件,方便查看和修改配置,
添加<span class="cmd">#R帮助</span>获取插件帮助,
添加<span class="cmd">#R版本</span>获取插件版本,