将Spotify播放列表转移到YouTube音乐
项目描述
一个简单的命令行脚本,用于克隆Spotify播放列表到YouTube音乐。
转移单个Spotify播放列表
喜欢Spotify播放列表中的所有歌曲
在YouTube音乐中更新已转移的播放列表
转移Spotify用户的全部播放列表
喜欢Spotify用户所有播放列表中的所有歌曲
从YouTube音乐中删除播放列表
安装
Python 3和pip - https://pythonlang.cn
安装
pip install spotify_to_ytmusic
设置
在https://developer.spotify.com/dashboard上生成一个新的应用
运行
spotify_to_ytmusic setup
为了与旧版本兼容,您也可以创建自己的文件并使用 --file settings.ini 传递它。
如果您想从Spotify转移私人播放列表(例如,喜欢的歌曲),则选择“是”进行OAuth身份验证,否则选择“否”。对于OAuth身份验证,您应在Spotify的开发者仪表板中将应用的重定向URI设置为 http://localhost。
用法
设置完成后,您可以从命令行简单地使用以下命令运行脚本:
spotify_to_ytmusic create <spotifylink>
其中 <spotifylink> 是类似 https://open.spotify.com/playlist/0S0cuX8pnvmF7gA47Eu63M 的链接
脚本将记录其进度并将找不到的YouTube音乐的曲目输出到 noresults_youtube.txt。
转移Spotify用户的全部播放列表
出于迁移目的,可以使用Spotify用户的ID(唯一的用户名)转移用户的所有公共播放列表。
spotify_to_ytmusic all <spotifyuserid>
传输Spotify用户的喜欢曲目
传输喜欢的歌曲时必须使用oAuth身份验证。
spotify_to_ytmusic liked
此命令将打开浏览器,您应在其中授权您的账户(如果您之前还没有这样做)。授权后,您将被重定向到localhost,复制您被重定向到的链接(看起来像localhost/?code=…),并将其粘贴到命令行。
命令行选项
有一些额外的命令行选项用于设置播放列表名称以及确定其是否公开。要查看它们,请运行
spotify_to_ytmusic -h
要查看子命令帮助,请运行,例如
spotify_to_ytmusic setup -h
可用子命令
positional arguments:
{setup,create,update,remove,all}
Provide a subcommand
setup Set up credentials
create Create a new playlist on YouTube Music.
update Delete all entries in the provided Google Play Music playlist and update the playlist with entries from the Spotify playlist.
remove Remove playlists with specified regex pattern.
all Transfer all public playlists of the specified user (Spotify User ID).
options:
-h, --help show this help message and exit
项目详情
spotify_to_ytmusic-0.4.0.tar.gz的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 4a9c2c504c02eb3f5c0b41e16bd53bd2e08c31f27fa7c99d0dcee70a16499df7 |
|
MD5 | d3ca934645f145c481a4111ffcb61ea8 |
|
BLAKE2b-256 | 3594a10f107c9a4c4ed7f4523bf68f691e93b07f384e2ebba167259a531c294e |
spotify_to_ytmusic-0.4.0-py3-none-any.whl的散列
算法 | 散列摘要 | |
---|---|---|
SHA256 | 03c7e316e3c508d126583fabfd6cf0cedceb02e3be495e1f21807dbcfea2dbd4 |
|
MD5 | c6c82457ad952d6c67a2ebf5953ddc38 |
|
BLAKE2b-256 | 7b1ee00bb9bdf8eb2a4e07ba9d53f04be8a20f2968f185c5a8f35cd78bf23de2 |