Skip to content

Commit

Permalink
规划开发路线
Browse files Browse the repository at this point in the history
  • Loading branch information
nichuanfang committed May 23, 2024
1 parent 3636c63 commit 91baf10
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**music-tool-kit**,主要使用场景为提取[youtube](https://www.youtube.com)[bilibili](https://www.bilibili.com)视频中的音频,支持**音频下载**,**元信息自动补全**,**音频截取**,**提取伴奏**,**youtube 列表批量下载**,**自定义批量下载**等.配合[spotify](https://open.spotify.com)**本地文件**功能可以极大的提升音乐体验([教程](https://www.bilibili.com/video/BV1VL411T7mp/?vd_source=04c6a0d121b6fb871e3d3c0a2554b29b))
**music-tool-kit**,主要使用场景为提取[youtube](https://www.youtube.com)[bilibili](https://www.bilibili.com)视频中的音频,支持**音频下载**,**元信息自动补全**,**音频截取**,**提取伴奏**,**youtube 列表批量下载**,**自定义批量下载**等.配合[itunes](https://www.bilibili.com/video/BV1sK4y1w75o/?spm_id_from=333.337.search-card.all.click&vd_source=04c6a0d121b6fb871e3d3c0a2554b29b)**本地文件**功能可以极大的提升音乐体验([教程](https://www.bilibili.com/video/BV1VL411T7mp/?vd_source=04c6a0d121b6fb871e3d3c0a2554b29b))

> [!NOTE]
>
Expand Down
22 changes: 20 additions & 2 deletions mk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,20 @@ def clip(path: str, start: str, end: str):
os.rename('output.m4a', path)
console.log(f"剪辑完成!")

# 破解音乐(暂时只支持网易云)
def unblock_music(path:str):
# 根据bin/um.exe解锁当前目录 目的是方便itunes导入 . 当前指令需要在网易云音乐指定的下载目录执行!
# 1. 获取um.exe文件目录
# 2. 目录判断,判断是否存在VipSongsDownload的同级目录,提醒用户需要在VipSongsDownload同级目录(即网易云音乐设置的本地下载路径)执行此指令;
# 3. 扫描当前目录获取所有音频文件
# 4. 扫描当前目录的子目录VipSongsDownload的音频文件
# 5. 无需破解的mp3,m4a格式直接移动到dist,flac文件则需要转换为m4a格式再移动到dist
# 6. 处理ncm文件 转换为flac等,再转m4a,移动到dist目录,删除已破解的ncm文件



pass


# 获取两个字符串相似度
# def get_similarity(s1: str, s2: str):
Expand All @@ -215,8 +229,6 @@ def clip(path: str, start: str, end: str):
# """
# return difflib.SequenceMatcher(lambda x: x in ["【", "】", "(", ")", "-", "_", ".", "[", "]", "|"], s1.lower(),
# s2.lower()).ratio()


# 从youtube搜索歌曲
async def search_youtube(name: str):
"""搜索歌曲
Expand Down Expand Up @@ -388,6 +400,7 @@ def main(args=None):
'批量下载: mk csv_path\n'
'搜索: mk -s name\n'
'剪辑: mk -c audio_path start end\n'
'破解: mk -u audio_path\n'
'---------------------------------------------\n'
)
return
Expand Down Expand Up @@ -450,6 +463,11 @@ def main(args=None):
# 下载地址 标题 开始时间 结束时间 是否生成伴奏(true or false)
writer.writerow(['url', 'title', 'start_time', 'end_time'])
print('生成成功!')
elif flag == '-u':
# 通过bin/um.exe来破解网易云音乐(暂时只支持网易云)
path = args[1]
unblock_music(path)
print('破解音乐成功!')
else:
# 判断flag是否是网址
if flag.startswith(('http://', 'https://')):
Expand Down

0 comments on commit 91baf10

Please sign in to comment.