从soundcloud.com下载曲目的工具
soundcloud_dl的Python项目详细描述
声云dl
从soundcloud.com下载曲目的小型命令行程序 您需要获得一个api密钥,因为流有速率限制
安装
使用pip
- 运行
pip install soundcloud_dl
源代码
- 克隆回购协议或下载zip
- 确保已安装PIP
cd
到文件夹pip install -r "requirements.txt"
获取api密钥
- 登录到soundcloud并注册一个新应用here。这应该会给您一个api密钥
- 导航到安装包的文件夹
Python36\Lib\site-packages\soundcloud-dl\downloader
- 创建一个名为
config.py
的文件,并在其中添加api密钥,如文件config-example.py所示
用法
选项
soundcloud_dl.py [-h] [-t] [-n] [-s] [-d DIR] [-a] [-l]
[-e EXCLUDE [EXCLUDE ...]] [-i INCLUDE [INCLUDE ...]]
[--limit LIMIT] [-r RANGE RANGE] [-g [GENRE]]
[url]
positional arguments:
url URL to download tracks from
optional arguments:
-h, --help show this help message and exit
-t, --top Downloads the top 10 tracks across all genres
-n, --new Downloads 10 new tracks across all genres
-s, --similar Downloads 10 tracks similar to the track in the URL
-d DIR, --dir DIR Directory to save tracks in. Default value is the
current working directory
-a, --all Download all tracks (Uploads and likes)
-l, --likes Download only liked tracks.
-e EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]
Enter track numbers to exclude.
-i INCLUDE [INCLUDE ...], --include INCLUDE [INCLUDE ...]
Enter track numbers to include
--limit LIMIT Maximum number of tracks to download
-r RANGE RANGE, --range RANGE RANGE
Enter range of tracks to download
-g [GENRE], --genre [GENRE]
use with --top to get top tracks from a specific genre
- 可以使用sc-dl代替soundcloud-dl
--top
、--new
和URL
参数是互斥的- url可以是指向用户、曲目或用户播放列表的链接。下载用户的上载,除非提供了--all或--likes选项
- 添加--include选项将覆盖--exclude选项
- 示例:
sc-dl https://soundcloud.com/aaasrith --dir D:\Music
- 示例:
sc-dl https://soundcloud.com/aaasrith --dir D:\Music --exclude 1 2 3
- 示例:
sc-dl https://soundcloud.com/aaasrith/closurewithaclause -s
贡献
pip install soundcloud_dl
cd
到文件夹pip install -r "requirements.txt"
Python36\Lib\site-packages\soundcloud-dl\downloader
config.py
的文件,并在其中添加api密钥,如文件config-example.py所示
soundcloud_dl.py [-h] [-t] [-n] [-s] [-d DIR] [-a] [-l]
[-e EXCLUDE [EXCLUDE ...]] [-i INCLUDE [INCLUDE ...]]
[--limit LIMIT] [-r RANGE RANGE] [-g [GENRE]]
[url]
positional arguments:
url URL to download tracks from
optional arguments:
-h, --help show this help message and exit
-t, --top Downloads the top 10 tracks across all genres
-n, --new Downloads 10 new tracks across all genres
-s, --similar Downloads 10 tracks similar to the track in the URL
-d DIR, --dir DIR Directory to save tracks in. Default value is the
current working directory
-a, --all Download all tracks (Uploads and likes)
-l, --likes Download only liked tracks.
-e EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]
Enter track numbers to exclude.
-i INCLUDE [INCLUDE ...], --include INCLUDE [INCLUDE ...]
Enter track numbers to include
--limit LIMIT Maximum number of tracks to download
-r RANGE RANGE, --range RANGE RANGE
Enter range of tracks to download
-g [GENRE], --genre [GENRE]
use with --top to get top tracks from a specific genre
--top
、--new
和URL
参数是互斥的sc-dl https://soundcloud.com/aaasrith --dir D:\Music
sc-dl https://soundcloud.com/aaasrith --dir D:\Music --exclude 1 2 3
sc-dl https://soundcloud.com/aaasrith/closurewithaclause -s
如果您想添加功能、改进功能或报告问题,请随时发送请求!