从soundcloud.com下载曲目的工具

soundcloud_dl的Python项目详细描述


声云dl

Downloads

从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--newURL参数是互斥的
  • 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

贡献

如果您想添加功能、改进功能或报告问题,请随时发送请求!

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java泛型重写抽象方法并具有子类的返回类型   Java中的字符串反转字符,同时保留一些字符   java将系统时间与我获取它的时间进行比较   java解析ODATA URL以在准备entityset之前读取ID值   java中的有界通配符下界泛型即使在传递超类时也不会编译   c#Java的JVM和Java的内部工作方式有什么不同。NET的CLR?   java如何在windows7上指定JDK的版本?   Java:列出单个目录中的所有文件(1020000+)   java使用Logback和Lombok   安卓谷歌玩java。lang.NullPointerException   使用RSA的解密结果在普通Java和Android中有所不同   具有默认连接池的java Spring引导   java我如何在一个坏的测试环境中前进?