|
1 | 1 | # Spotify Web Downloader
|
2 |
| -A Python CLI app for downloading songs/music videos/albums/playlists directly from Spotify. |
3 |
| - |
4 |
| -**Discord Server:** https://discord.gg/aBjMEZ9tnq |
5 |
| - |
6 |
| -## Features |
7 |
| -* Download songs in AAC 128kbps or in AAC 256kbps with a premium account |
8 |
| -* Download music videos with a premium account |
9 |
| -* Download synced lyrics with a premium account |
10 |
| -* Highly configurable |
11 |
| - |
12 |
| -## Prerequisites |
13 |
| -* Python 3.8 or higher |
14 |
| -* The cookies file of your Spotify account (free or premium) |
15 |
| - * You can get your cookies by using one of the following extensions on your browser of choice at the Spotify website with your account signed in: |
16 |
| - * Firefox: https://addons.mozilla.org/addon/export-cookies-txt |
17 |
| - * Chromium based browsers: https://chrome.google.com/webstore/detail/gdocmgbfkjnnpapoeobnolbbkoibbcif |
18 |
| -* FFmpeg on your system PATH |
19 |
| - * Older versions of FFmpeg may not work. |
20 |
| - * Up to date binaries can be obtained from the links below: |
21 |
| - * Windows: https://github.com/AnimMouse/ffmpeg-stable-autobuild/releases |
22 |
| - * Linux: https://johnvansickle.com/ffmpeg/ |
23 |
| - |
24 |
| -## Installation |
25 |
| -1. Install the package `spotify-web-downloader` using pip |
26 |
| - ```bash |
27 |
| - pip install spotify-web-downloader |
28 |
| - ``` |
29 |
| -2. Place your cookies file in the directory from which you will be running spotify-web-downloader and name it `cookies.txt`. |
30 |
| - |
31 |
| -## Usage |
32 |
| -```bash |
33 |
| -spotify-web-downloader [OPTIONS] URLS... |
34 |
| -``` |
35 | 2 |
|
36 |
| -### Examples |
37 |
| -* Download a song |
38 |
| - ```bash |
39 |
| - spotify-web-downloader "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo" |
40 |
| - ``` |
41 |
| -* Download an album |
42 |
| - ```bash |
43 |
| - spotify-web-downloader "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1" |
44 |
| - ``` |
45 |
| - |
46 |
| -## Configuration |
47 |
| -spotify-web-downloader can be configured using the command line arguments or the config file. The config file is created automatically when you run spotify-web-downloader for the first time at `~/.spotify-web-downloader/config.json` on Linux and `%USERPROFILE%\.spotify-web-downloader\config.json` on Windows. Config file values can be overridden using command line arguments. |
48 |
| -| Command line argument / Config file key | Description | Default value | |
49 |
| -| --------------------------------------------------------------- | ---------------------------------------------------------------------------- | -------------------------------------------- | |
50 |
| -| `--download-music-video` / `download_music_video` | Attempt to download music videos from songs (can lead to incorrect results). | `false` | |
51 |
| -| `--save-cover`, `-s` / `save_cover` | Save cover as a separate file. | `false` | |
52 |
| -| `--overwrite` / `overwrite` | Overwrite existing files. | `false` | |
53 |
| -| `--read-urls-as-txt`, `-r` / - | Interpret URLs as paths to text files containing URLs. | `false` | |
54 |
| -| `--lrc-only`, `-l` / `lrc_only` | Download only the synced lyrics. | `false` | |
55 |
| -| `--no-lrc` / `no_lrc` | Don't download the synced lyrics. | `false` | |
56 |
| -| `--config-path` / - | Path to config file. | `<home>/.spotify-web-downloader/config.json` | |
57 |
| -| `--log-level` / `log_level` | Log level. | `INFO` | |
58 |
| -| `--print-exceptions` / `print_exceptions` | Print exceptions. | `false` | |
59 |
| -| `--cookies-path`, `-c` / `cookies_path` | Path to .txt cookies file. | `./cookies.txt` | |
60 |
| -| `--output-path`, `-o` / `output_path` | Path to output directory. | `./Spotify` | |
61 |
| -| `--temp-path` / `temp_path` | Path to temporary directory. | `./temp` | |
62 |
| -| `--wvd-path` / `wvd_path` | Path to .wvd file. | `null` | |
63 |
| -| `--ffmpeg-path` / `ffmpeg_path` | Path to FFmpeg binary. | `ffmpeg` | |
64 |
| -| `--mp4box-path` / `mp4box_path` | Path to MP4Box binary. | `MP4Box` | |
65 |
| -| `--mp4decrypt-path` / `mp4decrypt_path` | Path to mp4decrypt binary. | `mp4decrypt` | |
66 |
| -| `--aria2c-path` / `aria2c_path` | Path to aria2c binary. | `aria2c` | |
67 |
| -| `--nm3u8dlre-path` / `nm3u8dlre_path` | Path to N_m3u8DL-RE binary. | `N_m3u8DL-RE` | |
68 |
| -| `--remux-mode` / `remux_mode` | Remux mode. | `ffmpeg` | |
69 |
| -| `--date-tag-template` / `date_tag_template` | Date tag template. | `%Y-%m-%dT%H:%M:%SZ` | |
70 |
| -| `--exclude-tags` / `exclude_tags` | Comma-separated tags to exclude. | `null` | |
71 |
| -| `--truncate` / `truncate` | Maximum length of the file/folder names. | `40` | |
72 |
| -| `--template-folder-album` / `template_folder_album` | Template of the album folders as a format string. | `{album_artist}/{album}` | |
73 |
| -| `--template-folder-compilation` / `template_folder_compilation` | Template of the compilation album folders as a format string. | `Compilations/{album}` | |
74 |
| -| `--template-file-single-disc` / `template_file_single_disc` | Template of the song files for single-disc albums as a format string. | `{track:02d} {title}` | |
75 |
| -| `--template-file-multi-disc` / `template_file_multi_disc` | Template of the song files for multi-disc albums as a format string. | `{disc}-{track:02d} {title}` | |
76 |
| -| `--download-mode-song` / `download_mode_song` | Download mode for songs. | `ytdlp` | |
77 |
| -| `--premium-quality`, `-p` / `premium_quality` | Download songs in premium quality. | `false` | |
78 |
| -| `--template-folder-music-video` / `template_folder_music_video` | Template of the music video folders as a format string. | `{artist}/Unknown Album` | |
79 |
| -| `--template-file-music-video` / `template_file_music_video` | Template of the music video files as a format string. | `{title}` | |
80 |
| -| `--download-mode-video` / `download_mode_video` | Download mode for videos. | `ytdlp` | |
81 |
| -| `--no-config-file`, `-n` / - | Do not use a config file. | `false` | |
82 |
| -
|
83 |
| -
|
84 |
| -### Tag variables |
85 |
| -The following variables can be used in the template folder/file and/or in the `exclude_tags` list: |
86 |
| -- `album` |
87 |
| -- `album_artist` |
88 |
| -- `artist` |
89 |
| -- `compilation` |
90 |
| -- `composer` |
91 |
| -- `copyright` |
92 |
| -- `cover` |
93 |
| -- `disc` |
94 |
| -- `disc_total` |
95 |
| -- `isrc` |
96 |
| -- `label` |
97 |
| -- `lyrics` |
98 |
| -- `media_type` |
99 |
| -- `producer` |
100 |
| -- `rating` |
101 |
| -- `release_date` |
102 |
| -- `release_year` |
103 |
| -- `title` |
104 |
| -- `track` |
105 |
| -- `track_total` |
106 |
| -- `url` |
107 |
| - |
108 |
| -### Remux modes |
109 |
| -The following remux modes are available: |
110 |
| -* `ffmpeg` |
111 |
| -* `mp4box` |
112 |
| - * Requires mp4decrypt |
113 |
| - * Can be obtained from here: https://gpac.wp.imt.fr/downloads |
114 |
| -
|
115 |
| -### Music videos quality |
116 |
| -Music videos will be downloaded in the highest quality available in H.264/AAC, up to 1080p. |
117 |
| -
|
118 |
| -### Download modes |
119 |
| -The following modes are available for songs: |
120 |
| -* `ytdlp` |
121 |
| -* `aria2c` |
122 |
| - * Faster than `ytdlp` |
123 |
| - * Can be obtained from here: https://github.com/aria2/aria2/releases |
| 3 | +A Python CLI app for downloading songs/music videos/albums/playlists directly from Spotify. |
124 | 4 |
|
125 |
| -The following modes are available for videos: |
126 |
| -* `ytdlp` |
127 |
| -* `nm3u8dlre` |
128 |
| - * Faster than `ytdlp` |
129 |
| - * Can be obtained from here: https://github.com/nilaoda/N_m3u8DL-RE/releases |
| 5 | +[**Note:** this is a downstream fork of [glomatico/spotify-web-downloader](https://github.com/glomatico/spotify-web-downloader), with Docker support added for personal use.] |
130 | 6 |
|
131 | 7 | ### Docker support
|
132 | 8 |
|
|
0 commit comments