efront 3.11.3 → 3.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/kugou/api.js +10 -7
- package/coms/kugou/parseSongsList.js +24 -10
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/apps/kugou/api.js
CHANGED
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
"https://m.kugou.com/": {
|
|
3
3
|
"song-info": "get app/i/getSongInfo.php?cmd=playInfo&from=mkugou&hash",
|
|
4
4
|
"slider-src": "get:[].mod-slider>.swipe-wrap>div .#src=img!src&href=a!href",
|
|
5
|
-
"songs-list": "get:[].panel-songslist
|
|
6
|
-
"rank-list": "get:[].panel-img-list
|
|
7
|
-
"rank-info": "get:[].panel-songslist
|
|
8
|
-
"plist-index": "get:[].panel-img-list
|
|
9
|
-
"plist-info": "get:[].panel-songslist
|
|
5
|
+
"songs-list": "get:[].panel-songslist%20li .#hash=!id&.panel-songs-item-name>span!innerText",
|
|
6
|
+
"rank-list": "get:[].panel-img-list%20li rank/list#href=a!href&=a!href\\rank-info&imgurl=img!_src&name=p|innerText",
|
|
7
|
+
"rank-info": "get:[].panel-songslist%20li rank/info/:id#src=!id&name=.panel-songs-item-name|innerText&data=.panel-songs-item-download/innerText",
|
|
8
|
+
"plist-index": "get:[].panel-img-list%20li plist/index#href=a!href&=a!href\\plist-info&imgurl=img!_src&name=.panel-img-content-first|innerText&count=.panel-img-content-sub|innerText",
|
|
9
|
+
"plist-info": "get:[].panel-songslist%20li plist/list/:id#name=.panel-songs-item-name|innerText&data=.panel-songs-item-download/innerText",
|
|
10
10
|
"search-hot": "get api/v3/search/hot?format=json&plat=0&count=30",
|
|
11
11
|
"singer-class": "get:[].bd%20li singer/class#href=a!href&=a!href\\singer-list&name=a|innerText&group=?parentNode",
|
|
12
|
-
"singer-list": "get:[].singer-img-list>li singer/list/:id#href=a!href&=a!href\\singer-
|
|
13
|
-
"singer-
|
|
12
|
+
"singer-list": "get:[].singer-img-list>li singer/list/:id#href=a!href&=a!href\\singer-info0&imgurl=img!_src&name=p|innerText",
|
|
13
|
+
"singer-info0": "mget:[].singer-songs-list>li singer/info/:id#hash=!id&singer=.singer-name|innerText&name=.song-name|innerText&data=em/innerText"
|
|
14
|
+
},
|
|
15
|
+
"https://www.kugou.com/": {
|
|
16
|
+
"singer-info": "cget:link[rel]+script yy/singer/home/:id.html",
|
|
14
17
|
},
|
|
15
18
|
"http://mobilecdn.kugou.com/": {
|
|
16
19
|
"search?keyword": "get:data.info api/v3/search/song?format=json&page=1&pagesize=30&showtype=1"
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
a =>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return
|
|
10
|
-
}
|
|
1
|
+
a => {
|
|
2
|
+
if (isElement(a)) {
|
|
3
|
+
var m = /songsdata\s*=\s*(\[[\s\S]*\])/.exec(a.innerText);
|
|
4
|
+
if (!m) throw new Error("无法加载数据!");
|
|
5
|
+
if (m) a = m[1];
|
|
6
|
+
a = JSON.parse(a);
|
|
7
|
+
console.log(a)
|
|
8
|
+
}
|
|
9
|
+
return a.map(b => {
|
|
10
|
+
var data = {};
|
|
11
|
+
if (b.data) extend(data, {
|
|
12
|
+
name: b.data.filename.replace(/^[\s\S]*?\s*\-\s*/, ''),
|
|
13
|
+
singer: b.data.filename.replace(/\s*\-\s*[\s\S]*?$/, '')
|
|
14
|
+
}, b.data);
|
|
15
|
+
else extend(data, b);
|
|
16
|
+
if (!data.singer) {
|
|
17
|
+
data.singer = data.author_name;
|
|
18
|
+
}
|
|
19
|
+
if (!data.name) data.name = data.audio_name;
|
|
20
|
+
if (data.hash) data.hash = data.hash.replace(/^songs\_/i, '');
|
|
21
|
+
return data;
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
}
|