33 * Meting music framework
44 * https://i-meto.com
55 * https://github.com/metowolf/Meting
6- * Version 1.3.6.1
6+ * Version 1.3.8
77 *
88 * Copyright 2017, METO Sheel <[email protected] > 99 * Released under the MIT license
@@ -106,7 +106,7 @@ private function pickup($array, $rule)
106106 {
107107 $ t =explode ('# ' , $ rule );
108108 foreach ($ t as $ vo ) {
109- if (is_null ($ array)) {
109+ if (! isset ($ array[ $ vo ])) {
110110 return array ();
111111 }
112112 $ array =$ array [$ vo ];
@@ -140,7 +140,7 @@ public function search($keyword, $page=1, $limit=30)
140140 'type ' => 1 ,
141141 'limit ' => $ limit ,
142142 'total ' => 'true ' ,
143- 'offset ' => $ page -1 ,
143+ 'offset ' => ( $ page -1 )* $ limit ,
144144 ),
145145 'url ' => 'http://music.163.com/api/cloudsearch/pc ' ,
146146 ),
@@ -151,14 +151,15 @@ public function search($keyword, $page=1, $limit=30)
151151 case 'tencent ' :
152152 $ API =array (
153153 'method ' => 'GET ' ,
154- 'url ' => 'https://c.y.qq.com/soso/fcgi-bin/search_cp ' ,
154+ 'url ' => 'https://c.y.qq.com/soso/fcgi-bin/client_search_cp ' ,
155155 'body ' => array (
156156 'p ' => $ page ,
157157 'n ' => $ limit ,
158158 'w ' => $ keyword ,
159159 'aggr ' => 1 ,
160160 'lossless ' => 1 ,
161161 'cr ' => 1 ,
162+ 'platform ' => 'yqq ' ,
162163 ),
163164 'decode ' => 'jsonp2json ' ,
164165 'format ' => 'data#song#list ' ,
@@ -245,8 +246,9 @@ public function song($id)
245246 'method ' => 'GET ' ,
246247 'url ' => 'https://c.y.qq.com/v8/fcg-bin/fcg_play_single_song.fcg ' ,
247248 'body ' => array (
248- 'songmid ' => $ id ,
249- 'format ' => 'json ' ,
249+ 'songmid ' => $ id ,
250+ 'platform ' => 'yqq ' ,
251+ 'format ' => 'json ' ,
250252 ),
251253 'decode ' => 'tencent_singlesong ' ,
252254 'format ' => 'data ' ,
@@ -268,7 +270,7 @@ public function song($id)
268270 case 'kugou ' :
269271 $ API =array (
270272 'method ' => 'POST ' ,
271- 'url ' => 'http://m.kugou.com/app/i/getSongInfo.php? ' ,
273+ 'url ' => 'http://m.kugou.com/app/i/getSongInfo.php ' ,
272274 'body ' => array (
273275 "cmd " => "playInfo " ,
274276 "hash " => $ id ,
@@ -322,6 +324,7 @@ public function album($id)
322324 'url ' => 'https://c.y.qq.com/v8/fcg-bin/fcg_v8_album_info_cp.fcg ' ,
323325 'body ' => array (
324326 'albummid ' => $ id ,
327+ 'platform ' => 'yqq ' ,
325328 ),
326329 'format ' => 'data#list ' ,
327330 );
@@ -402,6 +405,8 @@ public function artist($id, $limit=50)
402405 'singermid ' => $ id ,
403406 'begin ' => 0 ,
404407 'num ' => $ limit ,
408+ 'order ' => 'listen ' ,
409+ 'platform ' => 'yqq ' ,
405410 ),
406411 'format ' => 'data#list ' ,
407412 );
@@ -481,9 +486,10 @@ public function playlist($id)
481486 'method ' => 'GET ' ,
482487 'url ' => 'https://c.y.qq.com/qzone/fcg-bin/fcg_ucc_getcdinfo_byids_cp.fcg ' ,
483488 'body ' => array (
484- 'disstid ' => $ id ,
485- 'utf8 ' => 1 ,
486- 'type ' => 1 ,
489+ 'disstid ' => $ id ,
490+ 'utf8 ' => 1 ,
491+ 'type ' => 1 ,
492+ 'platform ' => 'yqq ' ,
487493 ),
488494 'decode ' => 'jsonp2json ' ,
489495 'format ' => 'cdlist#0#songlist ' ,
@@ -562,6 +568,7 @@ public function url($id, $br=320)
562568 'url ' => 'https://c.y.qq.com/v8/fcg-bin/fcg_play_single_song.fcg ' ,
563569 'body ' => array (
564570 'songmid ' => $ id ,
571+ 'platform ' => 'yqq ' ,
565572 'format ' => 'json ' ,
566573 ),
567574 'decode ' => 'tencent_url ' ,
@@ -743,8 +750,8 @@ private function curlset()
743750 'useragent ' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 ' ,
744751 ),
745752 'tencent ' =>array (
746- 'referer ' => 'http ://y.qq.com/portal/player.html ' ,
747- 'cookie ' => 'qqmusic_uin=12345678; qqmusic_key=12345678; qqmusic_fromtag=30 ; ts_last=y.qq.com/portal/player.html; ' ,
753+ 'referer ' => 'https ://y.qq.com/portal/player.html ' ,
754+ 'cookie ' => 'pgv_pvi=3832878080; pgv_si=s4066364416; pgv_pvid=3938077488; yplayer_open=1; qqmusic_fromtag=66 ; ts_last=y.qq.com/portal/player.html; ts_uid=5141451452; player_exist=1; yq_index=1 ' ,
748755 'useragent ' => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 ' ,
749756 ),
750757 'xiami ' =>array (
@@ -862,6 +869,7 @@ private function tencent_url($result)
862869
863870 $ type =array (
864871 'size_320mp3 ' => array (320 ,'M800 ' ,'mp3 ' ),
872+ 'size_192aac ' => array (192 ,'C600 ' ,'m4a ' ),
865873 'size_128mp3 ' => array (128 ,'M500 ' ,'mp3 ' ),
866874 'size_96aac ' => array (96 ,'C400 ' ,'m4a ' ),
867875 'size_48aac ' => array (48 ,'C200 ' ,'m4a ' ),
0 commit comments