百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

spotify-to-mp3

> 编程语言
开源

下载 Spotify 曲目的 MP3 文件

449 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

下载 Spotify 曲目的 MP3 文件

Spotify to MP3

A simple command line utility to download MP3 files of Spotify tracks. Note those files are downloaded from Grooveshark, not from Spotify itself.


Grooveshark, the service this app was relying on, has shut down. Don't expect it to work anymore :(


Installation

Mac OS X

bash
$ sudo gem install spotify-to-mp3

Probably sudo can be ommited if using rvm or similar.

Linux (Ubuntu)

Make sure you have rubygems installed and configured:

bash
$ sudo apt-get install ruby2.0 ruby2.0-dev
$ echo 'PATH=$PATH:/var/lib/gems/1.9/bin' | sudo tee /etc/profile.d/rubygems1.9.sh >/dev/null
bash
$ sudo gem2.0 install spotify-to-mp3

Usage

  1. Create a file (like songs.txt) and copy the Spotify songs URLs to it. Plain song names are also accepted. It will look like this:

    http://open.spotify.com/track/1JqTcOjOn7gEpeC0JcRVPa
    spotify:track:1fE3ddAlmjJ99IIfLgZjTy
    The Drums - Money
  2. Download songs. They are saved to the current directory. Errors will appear in red (like when a song is not found).

    bash
    $ spotify-to-mp3 songs.txt

Also, as it's common in Unix programs, you can pipe in the songs:

bash
$ echo white knuckle ride | spotify-to-mp3

or simply:

bash
$ spotify-to-mp3

and drag the songs from the Spotify app to the terminal.

Changelog

2015-01-25

  • Accept album URI's
  • Download progress bar

A big thanks to @dulakm for such great contributions!

2014-05-05

  • Accept track IDs from stdin

2012-08-20

  • Set filename artist and title from Grooveshark

2012-01-11

  • Touch already downloaded songs. This way songs no more in the download list can be spotted easily.

2011-10-03

  • Make it work on ruby 1.8.7 (Snow Leopard)

2011-09-26

  • Both Spotify URLs and plain song names are accepted

Development

Install Ruby.

bash
$ gem install bundler
$ bundle
$ bundle exec spotify-to-mp3
$ bundle exec rspec

Update RubyGems

Bump version in spotify-to-mp3.gemspec

bash
$ gem build spotify-to-mp3.gemspec
$ gem push spotify-to-mp3-[version].gem

TODO

  • Consider multiple artists songs
  • Filter Grooveshark results by artist, title and length
  • Accept tracks from stdin (instead of from a file, to drag songs directly to the app)
  • Exit with a single Ctrl+C
  • Cleaner output
  • Don't pick remixes

Issues· 9 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言