Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nondanee/163marker
Add "163 key" for media file
https://github.com/nondanee/163marker
netease-cloud-music
Last synced: 7 days ago
JSON representation
Add "163 key" for media file
- Host: GitHub
- URL: https://github.com/nondanee/163marker
- Owner: nondanee
- License: mit
- Created: 2019-07-02T04:21:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-30T16:27:18.000Z (about 3 years ago)
- Last Synced: 2024-08-04T04:07:04.551Z (4 months ago)
- Topics: netease-cloud-music
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 135
- Watchers: 4
- Forks: 10
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 163 Marker ![](https://img.shields.io/badge/python-3-blue?style=flat-square)
为歌曲添加 `163 key(Don't modify)` 标记
让非网易云客户端下载的音频文件能被客户端识别,正常匹配歌词和查看评论 (与云盘匹配无关)
## Dependency
```
$ pip install requests mutagen pycryptodome
```## Install
```
$ pip install git+https://github.com/nondanee/163marker.git
```## Usage
### Execute
```sh
$ 163marker -h # 等同于 "python 163marker/app.py -h" 和 "python -m 163marker.app -h"
usage: 163marker [-h] file [uri] [id]positional arguments:
file audio file path (MP3/FLAC)
uri meta data source (URL/PATH)
id specific song idoptional arguments:
-h, --help show this help message and exit
```- `file` 文件路径 (支持 MP3 和 FLAC 格式)
- `uri` 用户动态 / 专辑 / 歌曲链接 (客户端内分享,复制链接) 或文件路径 (拷贝标记)
- `id` 强制填充歌曲 ID (可选)### Import
```python
# 因包名为数字开头无法直接 import
import importlib
marker = importlib.import_module('163marker')
``````python
marker.extract(file_path) # 从文件读取标记内容marker.parse(resource_uri) # 从链接或文件地址获得元数据
marker.mark(file_path, song_meta, song_id) # 由元数据生成标记并写入文件
```> 注: 对于已经 "消失" 的曲目 (无歌曲链接)
>
> 1. 若曾分享单曲到动态,可从用户的动态中提取信息
> 2. 若曲目消失而专辑未下架,可用专辑信息重建数据,再填充歌曲 ID
> 3. 若曾下载过相同专辑的其他歌曲,可拷贝已有文件的标记,再填充歌曲 ID
>
> (2/3 情况下默认同专辑歌手一致,歌名将从 ID3 tag `title` 中读取,请预先设置)