mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 12:55:38 +00:00
* 🚚 netease 修复上游 api 跑路 fixd #147 * Update list.json
This commit is contained in:
parent
c1b663d56f
commit
51e01490a2
@ -102,7 +102,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "netease",
|
"name": "netease",
|
||||||
"version": "1.3",
|
"version": "1.31",
|
||||||
"section": "daily",
|
"section": "daily",
|
||||||
"maintainer": "xtaodada、KorenKrita",
|
"maintainer": "xtaodada、KorenKrita",
|
||||||
"size": "0.7 kb",
|
"size": "0.7 kb",
|
||||||
|
12
netease.py
12
netease.py
@ -8,12 +8,16 @@ from pagermaid.listener import listener
|
|||||||
description="随机一条网易云音乐评论。")
|
description="随机一条网易云音乐评论。")
|
||||||
async def netease(context):
|
async def netease(context):
|
||||||
await context.edit("获取中 . . .")
|
await context.edit("获取中 . . .")
|
||||||
req = get("https://api.oioweb.cn/api/wyypl.php")
|
try:
|
||||||
|
req = get("https://api.66mz8.com/api/music.163.php?format=json")
|
||||||
|
except:
|
||||||
|
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
||||||
|
return
|
||||||
if req.status_code == 200:
|
if req.status_code == 200:
|
||||||
data = json.loads(req.text)
|
data = json.loads(req.text)
|
||||||
res = data['Comment'] + '\n\n来自 @' + data[
|
res = data['comments'] + '\n\n来自 @' + data[
|
||||||
'UserName'] + ' 在鸽曲 <a href="http://music.163.com/song/media/outer/url?id=' + str(data['SongId']) + '.mp3">' + \
|
'nickname'] + ' 在鸽曲 <a href="' + str(data['music_url']) + '">' + \
|
||||||
data['SongName'] + ' --by' + data['SongAutho'] + '</a>' + ' 下方的评论\n\n该评论获得了' + str(data['likedCount']) + '个赞!'
|
data['name'] + ' --by' + data['artists_name'] + '</a>' + ' 下方的评论。'
|
||||||
await context.edit(res, parse_mode='html', link_preview=True)
|
await context.edit(res, parse_mode='html', link_preview=True)
|
||||||
else:
|
else:
|
||||||
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
await context.edit("出错了呜呜呜 ~ 无法访问到 API 服务器 。")
|
||||||
|
Loading…
Reference in New Issue
Block a user