https://github.com/ronething/mp-music
微信公众号 音乐 API 接入
https://github.com/ronething/mp-music
python3 wehcat
Last synced: 8 months ago
JSON representation
微信公众号 音乐 API 接入
- Host: GitHub
- URL: https://github.com/ronething/mp-music
- Owner: ronething
- License: mit
- Created: 2019-04-01T16:44:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-05T06:25:13.000Z (about 4 years ago)
- Last Synced: 2024-12-27T16:44:25.429Z (over 1 year ago)
- Topics: python3, wehcat
- Language: Python
- Size: 639 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mp-music
## Introduction
微信公众号接入音乐 API
其实应该很多人都做过了。只是无聊又想给自己的订阅号接入一下。
## Run
```python
git clone [repo]
pipenv install
```
~~在 `config/setting.py` 下新增 TOKEN='xxxx' 与公众号配置的 TOKEN 一致。~~
在 `app/config` 目录下新建 `secure.py` 新增 TOKEN='xxxx' 与公众号配置的 TOKEN 一致
```sh
pipenv shell
python manage.py
```
## Deploy
`mpmusic` 为 nginx 配置文件放置于 `/etc/nginx/sites-enabled/mpmusic`
`mpmusic.conf` 为 supervisor 配置文件放置于 `/etc/supervisor/conf.d/mpmusic.conf`
> 为了让 Click 在 Unix 以及 Python3 环境下能够正确处理编码问题,我们需要将环境变量 LC_ALL 和 LANG 设为 C.UTF-8 或 en_US.UTF-8,在 supervisord.conf 配置文件写入 -- 参考 《flask web 开发实战》
```shell
sudo vim /etc/supervisor/supervisord.conf
```
```shell
# 在 [supervisord] 下面添加
environment=LC_ALL='en_US.UTF-8',LANG='en_US.UTF-8'
```
## Demo

## Change Log
- Tue Sep 17 17:51:55 CST 2019 third version
增加 redis 缓存 因为个人订阅号没有办法使用客服接口?
- 2019年 09月 13日 星期五 01:46:35 CST second version
- Tue Apr 2 02:13:13 first version
## Acknowledgement
- [music-dl](https://github.com/0xHJK/music-dl)
- [qqmusic-api](https://github.com/MeiK2333/QQMusicAPI)