1+ /*
2+ @header ({
3+ searchable: 2,
4+ filterable: 0,
5+ quickSearch: 0,
6+ title: '米兔音乐',
7+ '类型': '影视',
8+ lang: 'ds'
9+ })
10+ */
11+
12+ var rule = {
13+ title : '米兔音乐' ,
14+ host : 'https://api.qqmp3.vip' ,
15+ url : '/api/fyclass' ,
16+ searchUrl : '/api/songs.php?type=search&keyword=**' ,
17+ class_name : '热门歌曲&新歌曲&随机歌曲' ,
18+ class_url : 'songs.php&songs.php?type=new&songs.php?type=rand' ,
19+ searchable : 2 ,
20+ quickSearch : 0 ,
21+ filterable : 0 ,
22+ play_parse : true ,
23+ limit : 6 ,
24+ double : true ,
25+ headers : {
26+ 'User-Agent' : 'Mozilla/5.0 (Linux; Android 12; V2284A Build/V417IR; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Safari/537.36' ,
27+ 'Accept' : '*/*' ,
28+ 'Origin' : 'https://www.qqmp3.vip' ,
29+ 'referer' : 'https://www.qqmp3.vip' ,
30+ 'x-requested-with' : 'com.mmbox.xbrowser' ,
31+ 'Sec-Fetch-Site' : 'same-site' ,
32+ 'Sec-Fetch-Mode' : 'cors' ,
33+ 'Sec-Fetch-Dest' : 'empty' ,
34+ 'Accept-Language' : 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7'
35+ } ,
36+ 推荐 : '*' ,
37+ 一级 : 'json:data;name;pic;artist;rid' ,
38+ 二级 : '*' ,
39+ 搜索 : 'json:data;name;pic;artist;rid' ,
40+ lazy : async function ( ) {
41+ let ridMatch = this . input . match ( / a p i \/ ( [ ^ / ? ] + ) / ) ;
42+ if ( ! ridMatch ) return this . input ;
43+ let rid = ridMatch [ 1 ] ;
44+ let api = 'https://api.qqmp3.vip/api/kw.php?rid=' + rid ;
45+ // console.log('解析接口:', api);
46+ let json = await request ( api ) ;
47+ let data = JSON . parse ( json ) ;
48+ if ( data . code === 200 && data . data ?. url ) {
49+ return {
50+ parse : 0 ,
51+ url : data . data . url ,
52+ header : this . headers ,
53+ lrc : data . data . lrc || '' ,
54+ playMode : 'repeat'
55+ } ;
56+ }
57+ return this . input ;
58+ } ,
59+ } ;
0 commit comments