Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion class.json.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
22 changes: 11 additions & 11 deletions include/Meting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <i@i-meto.com>
* Released under the MIT license
Expand All @@ -13,7 +13,7 @@

class Meting
{
const VERSION = '1.5.6';
const VERSION = '1.5.7';

public $raw;
public $data;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -1362,4 +1362,4 @@ private function format_baidu($data)

return $result;
}
}
}