Skip to content

Commit 39c431e

Browse files
author
Taois
committed
feat: 新版本
1 parent 8e46ed3 commit 39c431e

File tree

14 files changed

+4274
-7
lines changed

14 files changed

+4274
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ nodejs作为服务端的drpy实现。全面升级异步写法
7070

7171
## 更新记录
7272

73+
### 20260228
74+
75+
更新至V1.3.26
76+
7377
### 20260225
7478

7579
更新至V1.3.25

config/map.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,5 @@ AppYqk@@{"host":"https://gapi0320.3njzmrx1.com/config.json,https://gapi0320.lq0o
6666
AppYqk@@{"host":"https://gapi0725.5p8jcjc.com/config.json,https://gapi0725.olrv5gz.com/config.json,https://gapi0725.mvljeat.com/config.json,https://jzapp-1318635097.cos.ap-shanghai.myqcloud.com/config.json,https://juzi-config-1360051343.cos.ap-shanghai.myqcloud.com/config.json","appId":"fea23e11fc1241409682880e15fb2851","appkey":"f384b87cc9ef41e4842dda977bae2c7f","udid":"bfc18c00-c866-46cb-8d7b-121c39b942d4","bundlerId":"com.voraguzzee.ts","source":"1003_default","version":"1.0.1","versionCode":1000}@@橘子TV[Ayq]
6767
php@@{"host":"https://www.baidu.com"}@@php测试
6868
TG频道@@?type=url&params=../json/TG频道配置.json@@TG频道[优]
69-
TG频道@@?type=url&params=../json/TG短剧频道.json@@短剧频道[优]
69+
TG频道@@?type=url&params=../json/TG短剧频道.json@@短剧频道[优]
70+
Emby[优]@@{"host":"https://emby.bangumi.ca","userId":"80e861cbff1343bfa0bedcea78895b91","token":"8b0b16aae7e8403cb3d19969b82c3902","deviceId":"ea27caf7-9a51-4209-b1a5-374bf30c2ffd","clientVersion":"4.9.0.31","pageSize":30}@@Emby[优]

docs/updateRecord.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# drpyS更新记录
22

3+
### 20260228
4+
5+
更新至V1.3.26
6+
7+
1. `Emby[优].js` 改为传参源,可以从map.txt扩展其他emby资源站
8+
2. cat源支持不带init方法
9+
3. 新增一些听音乐源与短剧源与漫画源
10+
4. 增加 py版本的资源管理源,支持管理安卓系统资源
11+
312
### 20260225
413

514
更新至V1.3.25

libs/catvod.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,9 @@ const init = async function (filePath, env = {}, refresh) {
146146
// console.log('globalThis.ENV:', globalThis.ENV);
147147
// console.log('globalThis.getProxyUrl:', globalThis.getProxyUrl);
148148
// 加载 init
149-
await rule.init(default_init_cfg);
149+
if (typeof rule.init === 'function') {
150+
await rule.init(default_init_cfg);
151+
}
150152
let t2 = getNowTime();
151153
const moduleObject = deepCopy(rule);
152154
moduleObject.cost = t2 - t1;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drpy-node",
3-
"version": "1.3.25",
3+
"version": "1.3.26",
44
"main": "index.js",
55
"type": "module",
66
"scripts": {

public/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ <h3 id="免费壳子推荐">免费壳子推荐</h3>
7171
<li><a href="https://github.com/ingriddaleusag-dotcom/PeekPiliRelease">皮卡丘</a></li>
7272
</ul>
7373
<h2 id="更新记录">更新记录</h2>
74+
<h3 id="20260228">20260228</h3>
75+
<p>更新至V1.3.26</p>
7476
<h3 id="20260225">20260225</h3>
7577
<p>更新至V1.3.25</p>
7678
<h3 id="20260214">20260214</h3>

spider/catvod/听了么[听].js

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
/*
2+
@header({
3+
searchable: 1,
4+
filterable: 1,
5+
quickSearch: 1,
6+
title: '听了么[听]',
7+
lang: 'cat'
8+
})
9+
*/
10+
11+
function home() {
12+
return JSON.stringify({
13+
'class': [
14+
{'type_id': 'hot', 'type_name': '热门歌单'},
15+
{'type_id': 'new', 'type_name': '新歌推荐'}
16+
]
17+
});
18+
}
19+
20+
async function homeVod() {
21+
let url = 'http://wapi.kuwo.cn/api/pc/classify/playlist/getRcmPlayList?loginUid=0&loginSid=0&appUid=76039576&rn=30&order=hot&pn=1';
22+
let res = JSON.parse((await req(url)).content);
23+
let data = res.data?.data || res.data || [];
24+
let d = data.map(it => ({
25+
vod_name: it.name || it.title || '未命名歌单',
26+
vod_id: (it.id || it.pid || '').toString(),
27+
vod_pic: it.img || it.pic || it.cover || 'https://p1.music.126.net/SUeqMM8HOIpHv9Nhl9qt9w==/109951165647004069.jpg',
28+
vod_remarks: it.info || it.uname || it.userName || '',
29+
type_name: 'hot'
30+
}));
31+
return JSON.stringify({list: d});
32+
}
33+
34+
async function category(tid, pg) {
35+
let api = `http://wapi.kuwo.cn/api/pc/classify/playlist/getRcmPlayList?loginUid=0&loginSid=0&appUid=76039576&rn=30&order=${tid}&pn=${pg}&_=${Date.now()}`;
36+
let res = JSON.parse((await req(api)).content);
37+
let data = res.data?.data || res.data || [];
38+
let arr = data.map(it => ({
39+
vod_name: it.name || it.title || '未命名歌单',
40+
vod_id: (it.id || it.pid || '').toString(),
41+
vod_pic: it.img || it.pic || it.cover || 'https://p1.music.126.net/SUeqMM8HOIpHv9Nhl9qt9w==/109951165647004069.jpg',
42+
vod_remarks: it.info || it.uname || it.userName || '',
43+
type_name: tid
44+
}));
45+
return JSON.stringify({list: arr, page: +pg, pagecount: 999, limit: 30, total: 999});
46+
}
47+
48+
async function detail(vod_url) {
49+
let api = `http://nplserver.kuwo.cn/pl.svc?op=getlistinfo&pid=${vod_url.trim()}&pn=0&rn=200&encode=utf8&keyset=pl2012&identity=kuwo&pcmp4=1&vipver=MUSIC_9.1.1.2_BCS2&newver=1`;
50+
console.log(`✅[api]: ${api}`);
51+
let d = JSON.parse((await req(api)).content);
52+
console.log(`✅[d的结果: ]${JSON.stringify(d, null, 4)}`);
53+
let list = d.musiclist || [];
54+
55+
let playArr = [];
56+
let artistPicArr = [];
57+
58+
list.forEach(it => {
59+
let rid = (it.id || '').toString();
60+
let song = (it.name || it.SONGNAME || it.displaysongname || '').toString();
61+
let artist = (it.artist || it.ARTIST || it.FARTIST || it.displayartistname || '').toString();
62+
let albumpic = it.albumpic || '';
63+
let artistPic = it.artistPic || '';
64+
let displayName = artist ? `${song} [${artist}]` : song;
65+
66+
if (rid) {
67+
playArr.push(`${displayName}$${rid}&&${albumpic}&&${artistPic}`);
68+
artistPicArr.push(artistPic);
69+
}
70+
});
71+
72+
return JSON.stringify({
73+
list: [{
74+
vod_id: vod_url,
75+
vod_name: d.name || d.title || '酷我歌单',
76+
vod_pic: d.pic || d.img,
77+
vod_content: d.info || d.desc || '',
78+
vod_play_from: '酷我歌单',
79+
vod_play_pic: artistPicArr.join('#'),
80+
vod_play_pic_ratio: 1.5,
81+
vod_play_url: playArr.join('#')
82+
}]
83+
});
84+
}
85+
86+
async function play(flag, id) {
87+
// 解析格式:显示名称$歌曲ID&&专辑图片&&歌手图片
88+
let parts = id.split('&&');
89+
90+
// 第一部分可能包含显示名称$歌曲ID
91+
let firstPart = parts[0] || '';
92+
let firstParts = firstPart.split('$');
93+
let songId = firstParts.length > 1 ? firstParts[1] : firstParts[0];
94+
95+
let albumPic = parts[1] || '';
96+
let artistPic = parts[2] || '';
97+
98+
// 优先使用专辑图片,没有则使用歌手图片
99+
let picUrl = albumPic || artistPic;
100+
101+
if (/\.(m3u8|mp4|m4a|mp3|aac)(\?|$)/i.test(songId)) {
102+
return JSON.stringify({
103+
parse: 0,
104+
jx: 0,
105+
url: songId,
106+
pic: picUrl
107+
});
108+
}
109+
110+
async function getUrl(rid, br) {
111+
let api = `http://nmobi.kuwo.cn/mobi.s?f=web&user=0&source=kwplayerhd_ar_4.3.0.8_tianbao_T1A_qirui.apk&type=convert_url_with_sign&rid=${rid}&br=${br}`;
112+
let j = JSON.parse((await req(api)).content);
113+
return j?.data?.url?.trim() || '';
114+
}
115+
116+
let url = await getUrl(songId, '320kmp3') || await getUrl(songId, '128kmp3');
117+
let lrc = await getLyric(songId);
118+
119+
return JSON.stringify({
120+
parse: 0,
121+
jx: 0,
122+
url: url,
123+
pic: picUrl,
124+
cover: albumPic,
125+
lrc: lrc
126+
});
127+
}
128+
129+
async function getLyric(rid) {
130+
let url = `http://m.kuwo.cn/newh5/singles/songinfoandlrc?musicId=${rid}`;
131+
let res = (await req(url)).content;
132+
let json = JSON.parse(res);
133+
let lrclist = json?.data?.lrclist;
134+
if (!lrclist) return '';
135+
136+
return lrclist.map(item => {
137+
let time = +item.time;
138+
let min = Math.floor(time / 60).toString().padStart(2, '0');
139+
let sec = Math.floor(time % 60).toString().padStart(2, '0');
140+
let ms = Math.floor((time % 1) * 100).toString().padStart(2, '0');
141+
return `[${min}:${sec}.${ms}]${item.lineLyric}`;
142+
}).join('\n');
143+
}
144+
145+
async function search(wd, quick) {
146+
let searchUrl = `https://search.kuwo.cn/r.s?client=kt&all=${encodeURIComponent(wd)}&pn=0&rn=20&vipver=1&ft=music&encoding=utf8&rformat=json&mobi=1`;
147+
148+
let res = (await req(searchUrl)).content;
149+
let json = JSON.parse(res);
150+
let d = [];
151+
152+
if (json.abslist) {
153+
json.abslist.forEach(it => {
154+
if (it.MUSICRID) {
155+
let musicId = it.MUSICRID.replace('MUSIC_', '');
156+
let picUrl = it.hts_MVPIC || '';
157+
158+
d.push({
159+
vod_name: (it.NAME || '未知歌曲') + (it.ARTIST ? ' - ' + it.ARTIST : ''),
160+
vod_id: musicId,
161+
vod_pic: picUrl,
162+
vod_remarks: '酷我音乐',
163+
type_name: 'search'
164+
});
165+
}
166+
});
167+
}
168+
169+
return JSON.stringify({list: d});
170+
}
171+
172+
export function __jsEvalReturn() {
173+
return {home, homeVod, category, detail, play, search};
174+
}

0 commit comments

Comments
 (0)