Skip to content

Commit

Permalink
Update Meting.php (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
zyh001 authored and lwl12 committed Dec 28, 2018
1 parent 64bd38d commit 12469c2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions include/Meting.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class Meting
{
const VERSION = '1.5.4';
const VERSION = '1.5.5';

public $raw;
public $data;
Expand Down Expand Up @@ -230,15 +230,15 @@ public function search($keyword, $option = null)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.search.merge',
'isNew' => 1,
'platform' => 'darwin',
'page_no' => isset($option['page']) ? $option['page'] : 1,
'query' => $keyword,
'version' => '11.0.2',
'version' => '11.2.1',
'page_size' => isset($option['limit']) ? $option['limit'] : 30,
),
'format' => 'result.song_info.song_list',
Expand Down Expand Up @@ -304,7 +304,7 @@ public function song($id)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.song.getInfos',
Expand Down Expand Up @@ -386,13 +386,13 @@ public function album($id)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.album.getAlbumInfo',
'album_id' => $id,
'platform' => 'darwin',
'version' => '11.0.2',
'version' => '11.2.1',
),
'format' => 'songlist',
);
Expand Down Expand Up @@ -471,7 +471,7 @@ public function artist($id, $limit = 50)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.artist.getSongList',
Expand All @@ -480,7 +480,7 @@ public function artist($id, $limit = 50)
'platform' => 'darwin',
'offset' => 0,
'tinguid' => 0,
'version' => '11.0.2',
'version' => '11.2.1',
),
'format' => 'songlist',
);
Expand Down Expand Up @@ -557,13 +557,13 @@ public function playlist($id)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.diy.gedanInfo',
'listid' => $id,
'platform' => 'darwin',
'version' => '11.0.2',
'version' => '11.2.1',
),
'format' => 'content',
);
Expand Down Expand Up @@ -642,7 +642,7 @@ public function url($id, $br = 320)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.song.getInfos',
Expand Down Expand Up @@ -721,7 +721,7 @@ public function lyric($id)
case 'baidu':
$api = array(
'method' => 'GET',
'url' => 'https://gss2.baidu.com/6Ls1aze90MgYm2Gp8IqW0jdnxx1xbK/v1/restserver/ting',
'url' => 'http://musicapi.taihe.com/v1/restserver/ting',
'body' => array(
'from' => 'qianqianmini',
'method' => 'baidu.ting.song.lry',
Expand Down Expand Up @@ -814,7 +814,7 @@ private function curlset()
case 'baidu':
return array(
'Cookie' => 'BAIDUID='.$this->getRandomHex(32).':FG=1',
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) baidu-music/1.1.5 Chrome/61.0.3163.100 Electron/2.0.0 Safari/537.36',
'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) baidu-music/1.2.1 Chrome/66.0.3359.181 Electron/3.0.5 Safari/537.36',
'Accept' => '*/*',
'Content-type' => 'application/json;charset=UTF-8',
'Accept-Language' => 'zh-CN',
Expand Down Expand Up @@ -1335,4 +1335,4 @@ private function format_baidu($data)

return $result;
}
}
}

0 comments on commit 12469c2

Please sign in to comment.