mirror of
https://github.com/metowolf/Meting.git
synced 2026-09-03 07:27:07 +08:00
16
Meting.php
16
Meting.php
@@ -811,18 +811,10 @@ class Meting
|
||||
private function netease_url($result)
|
||||
{
|
||||
$data=json_decode($result, 1);
|
||||
if($data['data'][0]['uf'] != null){
|
||||
$url=array(
|
||||
'url' => str_replace('http:', 'https:', $data['data'][0]['uf']['url']),
|
||||
'br' =>$data['data'][0]['uf']['type'],
|
||||
$url=array(
|
||||
'url' => str_replace('http:', 'https:', $data['data'][0]['url']),
|
||||
'br' => $data['data'][0]['br']/1000,
|
||||
);
|
||||
}
|
||||
else{
|
||||
$url=array(
|
||||
'url' => str_replace('http:', 'https:', $data['data'][0]['url']),
|
||||
'br' => $data['data'][0]['br']/1000,
|
||||
);
|
||||
}
|
||||
return json_encode($url);
|
||||
}
|
||||
private function tencent_url($result)
|
||||
@@ -986,8 +978,6 @@ class Meting
|
||||
'url_id' => $data['id'],
|
||||
'lyric_id' => $data['id'],
|
||||
'source' => 'netease',
|
||||
'maxbr' => $data['privilege']['maxbr'],
|
||||
'al_name' => $data['al']['name'],
|
||||
);
|
||||
if (isset($data['al']['picUrl'])) {
|
||||
preg_match('/\/(\d+)\./', $data['al']['picUrl'], $match);
|
||||
|
||||
98
README.md
98
README.md
@@ -1,69 +1,59 @@
|
||||

|
||||
|
||||
##改动说明
|
||||
+ 扩展封装
|
||||
+ 修复网易云音乐的ape解析
|
||||
## Meting
|
||||
[](https://packagist.org/packages/metowolf/Meting)
|
||||
[](https://packagist.org/packages/metowolf/Meting)
|
||||
|
||||
## 以下为原版介绍
|
||||
> :lollipop:Wow, such a powerful music API framework
|
||||
|
||||
## Introduction
|
||||
A powerful music API framework to accelerate development
|
||||
|
||||
>
|
||||
>## Meting
|
||||
>[](https://packagist.org/packages/metowolf/Meting)
|
||||
>[](https://packagist.org/packages/metowolf/Meting)
|
||||
+ **Easy** - Easy to use, suppose format return.
|
||||
+ **Light** - 38KB around with only one file.
|
||||
+ **Powerful** - Suppose various webserver, include netease, tencent, xiami, kugou, baidu, kuwo and more.
|
||||
+ **Free** - Under MIT license, you can use it anywhere if you want.
|
||||
|
||||
> > :lollipop:Wow, such a powerful music API framework
|
||||
## Requirement
|
||||
PHP 5.3+ and Curl extension installed
|
||||
|
||||
>## Introduction
|
||||
>A powerful music API framework to accelerate development
|
||||
## Get Started
|
||||
|
||||
>+ **Easy** - Easy to use, suppose format return.
|
||||
>+ **Light** - 38KB around with only one file.
|
||||
>+ **Powerful** - Suppose various webserver, include netease, tencent, xiami, kugou, baidu, >kuwo and more.
|
||||
>+ **Free** - Under MIT license, you can use it anywhere if you want.
|
||||
### Install via composer
|
||||
Add Meting to composer.json configuration file.
|
||||
```
|
||||
$ composer require metowolf/meting
|
||||
```
|
||||
And update the composer
|
||||
```
|
||||
$ composer update
|
||||
```
|
||||
|
||||
>## Requirement
|
||||
>PHP 5.3+ and Curl extension installed
|
||||
### Install via require
|
||||
```php
|
||||
// If you installed via composer, just use this code to requrie autoloader on the top of your projects.
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
>## Get Started
|
||||
// Else use require file
|
||||
// require 'Meting.php';
|
||||
|
||||
>### Install via composer
|
||||
>Add Meting to composer.json configuration file.
|
||||
>```
|
||||
>$ composer require metowolf/meting
|
||||
>```
|
||||
>And update the composer
|
||||
>```
|
||||
>$ composer update
|
||||
>```
|
||||
// Initialize to netease API
|
||||
$API = new Meting('netease');
|
||||
|
||||
>### Install via require
|
||||
>```php
|
||||
>// If you installed via composer, just use this code to requrie autoloader on the top of your projects.
|
||||
>require 'vendor/autoload.php';
|
||||
// Enjoy
|
||||
$data = $API->format(true)->search('Soldier');
|
||||
```
|
||||
|
||||
## More usage
|
||||
[wiki/docs](https://github.com/metowolf/Meting/wiki)
|
||||
|
||||
>// Else use require file
|
||||
>// require 'Meting.php';
|
||||
## Related Projects
|
||||
- [Hermit-X (Wordpress)](https://github.com/liwanglin12/Hermit-X)
|
||||
- [Meting for Typecho](https://github.com/metowolf/Meting-Typecho-Plugin)
|
||||
|
||||
>// Initialize to netease API
|
||||
>$API = new Meting('netease');
|
||||
## License
|
||||
Meting is under the MIT license.
|
||||
|
||||
>// Enjoy
|
||||
>$data = $API->format(true)->search('Soldier');
|
||||
>```
|
||||
>
|
||||
|
||||
|
||||
>## More usage
|
||||
>[wiki/docs](https://github.com/metowolf/Meting/wiki)
|
||||
|
||||
>## Related Projects
|
||||
>- [Hermit-X (Wordpress)](https://github.com/liwanglin12/Hermit-X)
|
||||
>- [Meting for Typecho](https://github.com/metowolf/Meting-Typecho-Plugin)
|
||||
|
||||
>## License
|
||||
>Meting is under the MIT license.
|
||||
|
||||
>## Links
|
||||
>Official website: https://i-meto.com
|
||||
>Demo: https://music.i-meto.com
|
||||
## Links
|
||||
Official website: https://i-meto.com
|
||||
Demo: https://music.i-meto.com
|
||||
|
||||
Reference in New Issue
Block a user