[分享]网易云缓存 [.UC!]文件转 [.mp3]

2024-04-15 10:00:14 42点赞 455收藏 26评论

该工具的起因是作者发现一首网易云收藏的歌居然和昨天听到的不一样了,于是想到从缓存文件提取原歌曲。

实际效果是这样的:

图片图片

下载地址在这里:

原作者链接:https://www.123pan.com/s/TKR5Vv-rfr5v.html提取码:7AjK

分享链接(包含dll):https://www.123pan.com/s/Y4kqVv-Mdsbv.html

如果你是一位大神,想要自己魔改的话:

界面工具使用的 tkinter,核心代码就是 ucToFlac 这个函数,将指定文件按字节与0xA3进行异或,并对文件格式进行修改。

import os import tkinter as tk from tkinter import filedialog from tkinter.scrolledtext import ScrolledText import threading def getAllFiles(path): # 返回指定目录下的所有文件名 return [os.path.join(path, f) for f in os.listdir(path) if os.path.isfile(os.path.join(path, f))] def isUcExtension(file): # 判断是否是.uc文件 return file.endswith('.uc!') def ucToFlac(file, output_dir): # 将指定文件按字节与0xA3进行异或,并对文件格式进行修改 with open(file, 'rb') as fSource: content = bytearray(fSource.read()) for index in range(len(content)): content[index] ^= 0xA3 # 确保输出文件名正确处理,只保留一个.mp3后缀 # 先移除".uc!"后缀,然后检查并处理重复的.mp3后缀 output_file_base = file[:-4] # 移除".uc!"后缀 if output_file_base.endswith('.mp3'): output_file_name = output_file_base # 已经是.mp3结尾,无需改动 else: output_file_name = output_file_base + '.mp3' # 添加.mp3后缀 output_file = os.path.join(output_dir, os.path.basename(output_file_name)) with open(output_file, 'wb') as fOut: fOut.write(content) return output_file def convertFilesThread(input_dir, output_dir): if not os.path.isdir(input_dir) or not os.path.isdir(output_dir): logMessage("错误: 输入或输出目录无效n") return files = getAllFiles(input_dir) for file in files: if isUcExtension(file): output_file = ucToFlac(file, output_dir) logMessage(os.path.basename(output_file) + ' 转换成功n') def convertFiles(): input_dir = input_dir_entry.get() output_dir = output_dir_entry.get() # 创建并启动一个新线程来执行耗时的转换任务 threading.Thread(target=convertFilesThread, args=(input_dir, output_dir)).start() def selectInputDir(): dirname = filedialog.askdirectory() if dirname: input_dir_entry.delete(0, tk.END) input_dir_entry.insert(0, dirname) def selectOutputDir(): dirname = filedialog.askdirectory() if dirname: output_dir_entry.delete(0, tk.END) output_dir_entry.insert(0, dirname) def logMessage(message): # 在文本框中显示信息 if log_text: log_text.config(state=tk.NORMAL) log_text.insert(tk.END, message) log_text.config(state=tk.DISABLED) log_text.see(tk.END) # 创建GUI界面 root = tk.Tk() root.title("UC文件转MP3工具") # 使用grid布局 tk.Label(root, text="输入目录:").grid(row=0, column=0, sticky='e') input_dir_entry = tk.Entry(root, width=50) input_dir_entry.grid(row=0, column=1) tk.Button(root, text="选择", command=selectInputDir).grid(row=0, column=2) tk.Label(root, text="输出目录:").grid(row=1, column=0, sticky='e') output_dir_entry = tk.Entry(root, width=50) output_dir_entry.grid(row=1, column=1) tk.Button(root, text="选择", command=selectOutputDir).grid(row=1, column=2) tk.Button(root, text="开始转换", command=convertFiles).grid(row=2, column=0, columnspan=3) # 增加一个ScrolledText组件来显示转换日志 log_text = ScrolledText(root, height=10) log_text.grid(row=3, column=0, columnspan=3, sticky='nsew') # 配置行列权重,确保GUI元素在窗口调整大小时表现良好 root.grid_rowconfigure(3, weight=1) root.grid_columnconfigure(1, weight=1) root.mainloop()

最后,如果遇到了 api-ms-win-core-path-l1-1-0.dll 丢失的问题,可以打开下面的网址下载,或者使用自己喜欢的工具进行下载。

https://www.dll-files.com/api-ms-win-core-path-l1-1-0.dll.html

图片图片

也可以直接通过下面的链接下载:

https://www.123pan.com/s/Y4kqVv-Mdsbv.html

作者声明本文无利益相关,欢迎值友理性交流,和谐讨论~

展开 收起

Microsoft 微软 Office 365 个人版

Microsoft 微软 Office 365 个人版

106元起

Microsoft 微软 到手18.2元/月 微软office365家庭版microsoft365增强版15个月

Microsoft 微软 到手18.2元/月 微软office365家庭版microsoft365增强版15个月

279元起

Microsoft 微软 office专业版永久激活码office2019增强版终身版outlook密钥

Microsoft 微软 office专业版永久激活码office2019增强版终身版outlook密钥

249元起

Microsoft 微软 活动6天 office365家庭版microsoft365订阅密钥

Microsoft 微软 活动6天 office365家庭版microsoft365订阅密钥

239元起

自助挂号应用服务

自助挂号应用服务

15000元起

Microsoft 微软 Office2016小型企业版 MAC专用

Microsoft 微软 Office2016小型企业版 MAC专用

149元起

SANGFOR 深信服科技 存储虚拟化双活软件V6.0

SANGFOR 深信服科技 存储虚拟化双活软件V6.0

29000元起

猎寻 手机信息采集系统1.0 -ZK5000(手机快速点验/手机检查仪)

猎寻 手机信息采集系统1.0 -ZK5000(手机快速点验/手机检查仪)

38800元起

Microsoft 微软 365家庭版个人版正版密钥Office365永久激活2021Mac

Microsoft 微软 365家庭版个人版正版密钥Office365永久激活2021Mac

暂无报价

黑马校对软件v22.0国产化平台服务器版6亿字技术支持私有化部署服务

黑马校对软件v22.0国产化平台服务器版6亿字技术支持私有化部署服务

170000元起

京东 金山麒麟WPS办公软件V11

京东 金山麒麟WPS办公软件V11

暂无报价

Microsoft 微软 MAC专用办公软件office2019永久版

Microsoft 微软 MAC专用办公软件office2019永久版

269元起

华三(H3C) SecPath F100-BAS AV 防病毒 License,3年

华三(H3C) SecPath F100-BAS AV 防病毒 License,3年

6904元起

卡巴斯基(kaspersky)网络解决方案中小企业版杀毒软件1服务器10台PC三年升级

卡巴斯基(kaspersky)网络解决方案中小企业版杀毒软件1服务器10台PC三年升级

3990元起

Nintendo 任天堂 Switch游戏卡带《大航海时代4 威力加强版 HD》 中文

Nintendo 任天堂 Switch游戏卡带《大航海时代4 威力加强版 HD》 中文

196元起

华三(H3C) SecPath F100-BAS URL特征库升级服务授权函,3年

华三(H3C) SecPath F100-BAS URL特征库升级服务授权函,3年

2701元起
26评论

  • 精彩
  • 最新
提示信息

取消
确认
评论举报

相关好价推荐
查看更多好价

相关文章推荐

更多精彩文章
更多精彩文章
最新文章 热门文章
455
扫一下,分享更方便,购买更轻松