From 3f82558d689c6b7451c718b9b041441085b9ccb3 Mon Sep 17 00:00:00 2001 From: Narth_Qin <39579967+ChinCskw@users.noreply.github.com> Date: Sat, 17 Aug 2019 19:18:10 +0800 Subject: [PATCH] Add files via upload --- class.json.php | 5 ++++- include/Meting.php | 22 +++++++++++----------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/class.json.php b/class.json.php index d10553d..caccb61 100644 --- a/class.json.php +++ b/class.json.php @@ -46,9 +46,12 @@ public function song_url($site, $music_id) $url = str_replace('http://m7.', 'https://m7.', $url); $url = str_replace('http://m10', 'https://m10', $url); } - if ($site === "xiami" || $site === 'tencent') { + if ($site === "xiami") { $url = str_replace('http://', 'https://', $url); } + if ($site === 'tencent') { + $url = str_replace('http://ws.stream.qqmusic.qq.com', 'https://dl.stream.qqmusic.qq.com', $url); + } if ($site === 'baidu') { $url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url); } diff --git a/include/Meting.php b/include/Meting.php index 55834cc..198c3ba 100644 --- a/include/Meting.php +++ b/include/Meting.php @@ -3,7 +3,7 @@ * Meting music framework * https://i-meto.com * https://github.com/metowolf/Meting - * Version 1.5.6. + * Version 1.5.7. * * Copyright 2019, METO Sheel * Released under the MIT license @@ -13,7 +13,7 @@ class Meting { - const VERSION = '1.5.6'; + const VERSION = '1.5.7'; public $raw; public $data; @@ -192,7 +192,7 @@ public function search($keyword, $option = null) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.search.searchservice.searchsongs/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.search.searchservice.searchsongs/1.0/', 'body' => array( 'data' => array( 'key' => $keyword, @@ -278,7 +278,7 @@ public function song($id) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.music.songservice.getsongdetail/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.music.songservice.getsongdetail/1.0/', 'body' => array( 'data' => array( 'songId' => $id, @@ -357,7 +357,7 @@ public function album($id) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.music.albumservice.getalbumdetail/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.music.albumservice.getalbumdetail/1.0/', 'body' => array( 'data' => array( 'albumId' => $id, @@ -438,7 +438,7 @@ public function artist($id, $limit = 50) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.music.songservice.getartistsongs/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.music.songservice.getartistsongs/1.0/', 'body' => array( 'data' => array( 'artistId' => $id, @@ -523,7 +523,7 @@ public function playlist($id) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.music.list.collectservice.getcollectdetail/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.music.list.collectservice.getcollectdetail/1.0/', 'body' => array( 'data' => array( 'listId' => $id, @@ -603,7 +603,7 @@ public function url($id, $br = 320) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.music.songservice.getsongs/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.music.songservice.getsongs/1.0/', 'body' => array( 'data' => array( 'songIds' => array( @@ -693,7 +693,7 @@ public function lyric($id) case 'xiami': $api = array( 'method' => 'GET', - 'url' => 'http://h5api.m.xiami.com/h5/mtop.alimusic.music.lyricservice.getsonglyrics/1.0/', + 'url' => 'https://acs.m.xiami.com/h5/mtop.alimusic.music.lyricservice.getsonglyrics/1.0/', 'body' => array( 'data' => array( 'songId' => $id, @@ -935,7 +935,7 @@ private function baidu_AESCBC($api) private function xiami_sign($api) { - $data = $this->curl('http://h5api.m.xiami.com/h5/mtop.alimusic.search.searchservice.searchsongs/1.0/?appKey=12574478&t=1511168684000&dataType=json&data=%7B%22requestStr%22%3A%22%7B%5C%22model%5C%22%3A%7B%5C%22key%5C%22%3A%5C%22Dangerous+Woman%5C%22%2C%5C%22pagingVO%5C%22%3A%7B%5C%22page%5C%22%3A1%2C%5C%22pageSize%5C%22%3A30%7D%7D%7D%22%7D&api=mtop.alimusic.search.searchservice.searchsongs&v=1.0&type=originaljson&sign=f6c99a429e9ef703ea955f7cd113a467', null, 1); + $data = $this->curl('https://acs.m.xiami.com/h5/mtop.alimusic.recommend.songservice.getdailysongs/1.0/?appKey=12574478&t=1560663823000&dataType=json&data=%7B%22requestStr%22%3A%22%7B%5C%22header%5C%22%3A%7B%5C%22platformId%5C%22%3A%5C%22mac%5C%22%7D%2C%5C%22model%5C%22%3A%5B%5D%7D%22%7D&api=mtop.alimusic.recommend.songservice.getdailysongs&v=1.0&type=originaljson&sign=22ad1377ee193f3e2772c17c6192b17c', null, 1); preg_match_all('/_m_h5[^;]+/', $data->raw, $match); $this->header['Cookie'] = $match[0][0].'; '.$match[0][1]; $data = json_encode(array( @@ -1362,4 +1362,4 @@ private function format_baidu($data) return $result; } -} \ No newline at end of file +}