spotify-aac-downloader


Namespotify-aac-downloader JSON
Version 1.5.4 PyPI version JSON
download
home_pageNone
SummaryDownload songs/albums/playlists directly from Spotify in AAC
upload_time2024-01-30 21:49:53
maintainerNone
docs_urlNone
authorglomatico
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Spotify AAC Downloader
A Python script to download songs/albums/playlists directly from Spotify in 256kbps/128kbps AAC.

## Features
* Download songs in 128kbps AAC or 256kbps AAC with a premium account
* Download synced lyrics
* Highly customizable

## Installation
1. Install Python 3.7 or higher
2. Add [FFmpeg](https://ffmpeg.org/download.html) to PATH
    * Older versions of FFmpeg may not work
3. Place your cookies in the same folder that you will run spotify-aac-downloader as `cookies.txt`
    * You can export your cookies by using this Google Chrome extension on Spotify website: https://chrome.google.com/webstore/detail/open-cookiestxt/gdocmgbfkjnnpapoeobnolbbkoibbcif. Make sure to be logged in.
4. Place your .wvd file in the same folder that you will run spotify-aac-downloader as `device.wvd`
    * To get a .wvd file, you can use [dumper](https://github.com/wvdumper/dumper) to dump a L3 CDM from an Android device. Once you have the L3 CDM, use pywidevine to create the .wvd file from it.
        1. Install pywidevine with pip
            ```bash
            pip install pywidevine pyyaml
            ```
        2. Create the .wvd file
            ```bash
            pywidevine create-device -t ANDROID -l 3 -k private_key.pem -c client_id.bin -o .
            ```
5. Install spotify-aac-downloader using pip
    ```bash
    pip install spotify-aac-downloader
    ```

## Examples
* Download a song
    ```bash
    spotify-aac-downloader "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo"
    ```
* Download an album
    ```bash
    spotify-aac-downloader "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1"
    ```

## Configuration
spotify-aac-downloader can be configured using the command line arguments or the config file. The config file is created automatically when you run spotify-aac-downloader for the first time at `~/.spotify-aac-downloader/config.json` on Linux and `%USERPROFILE%\.spotify-aac-downloader\config.json` on Windows. Config file values can be overridden using command line arguments.
| Command line argument / Config file key                         | Description                                                           | Default value                                       |
| --------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------- |
| `-f`, `--final-path` / `final_path`                             | Path where the downloaded files will be saved.                        | `./Spotify`                                         |
| `-t`, `--temp-path` / `temp_path`                               | Path where the temporary files will be saved.                         | `./temp`                                            |
| `-c`, `--cookies-location` / `cookies_location`                 | Location of the cookies file.                                         | `./cookies.txt`                                     |
| `-w`, `--wvd-location` / `wvd_location`                         | Location of the .wvd file.                                            | `./device.wvd`                                      |
| `--config-location` / -                                         | Location of the config file.                                          | `<home_folder>/.spotify-aac-downloader/config.json` |
| `--ffmpeg-location` / `ffmpeg_location`                         | Location of the FFmpeg binary.                                        | `ffmpeg`                                            |
| `--aria2c-location` / `aria2c_location`                         | Location of the aria2c binary.                                        | `aria2c`                                            |
| `--template-folder-album` / `template_folder_album`             | Template of the album folders as a format string.                     | `{album_artist}/{album}`                            |
| `--template-folder-compilation` / `template_folder_compilation` | Template of the compilation album folders as a format string.         | `Compilations/{album}`                              |
| `--template-file-single-disc` / `template_file_single_disc`     | Template of the song files for single-disc albums as a format string. | `{track:02d} {title}`                               |
| `--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}`                        |
| `--download-mode` / `download_mode`                             | Download mode.                                                        | `ytdlp`                                             |
| `-e`, `--exclude-tags` / `exclude_tags`                         | List of tags to exclude from file tagging separated by commas.        | `null`                                              |
| `--truncate` / `truncate`                                       | Maximum length of the file/folder names.                              | `40`                                                |
| `-l`, `--log-level` / `log_level`                               | Log level.                                                            | `INFO`                                              |
| `-p`, `--premium-quality` / `premium_quality`                   | Download in 256kbps AAC instead of 128kbps AAC.                       | `false`                                             |
| `-l`, `--lrc-only` / `lrc_only`                                 | Download only the synced lyrics.                                      | `false`                                             |
| `-n`, `--no-lrc` / `no_lrc`                                     | Don't download the synced lyrics.                                     | `false`                                             |
| `-s`, `--save-cover` / `save_cover`                             | Save cover as a separate file.                                        | `false`                                             |
| `-o`, `--overwrite` / `overwrite`                               | Overwrite existing files.                                             | `false`                                             |
| `--print-exceptions` / `print_exceptions`                       | Print exceptions.                                                     | `false`                                             |
| `-u`, `--url-txt` / -                                           | Read URLs as location of text files containing URLs.                  | `false`                                             |
| `-n`, `--no-config-file` / -                                    | Don't use the config file.                                            | `false`                                             |

### Tag variables
The following variables can be used in the template folder/file and/or in the `exclude_tags` list:
- `album`
- `album_artist`
- `artist`
- `comment`
- `compilation`
- `copyright`
- `cover`
- `disc`
- `disc_total`
- `isrc`
- `label`
- `lyrics`
- `media_type`
- `rating`
- `release_date`
- `title`
- `track`
- `track_total`

### Download mode
The following download modes are available:
* `ytdlp`
* `aria2c`
    * Faster than `ytdlp`
    * Can be obtained from here: https://github.com/aria2/aria2/releases

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spotify-aac-downloader",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "glomatico",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ae/ca/33b04b69ad9a79546549095ddad96a589cea4bdccbdee3ec2e2e5acf6332/spotify_aac_downloader-1.5.4.tar.gz",
    "platform": null,
    "description": "# Spotify AAC Downloader\nA Python script to download songs/albums/playlists directly from Spotify in 256kbps/128kbps AAC.\n\n## Features\n* Download songs in 128kbps AAC or 256kbps AAC with a premium account\n* Download synced lyrics\n* Highly customizable\n\n## Installation\n1. Install Python 3.7 or higher\n2. Add [FFmpeg](https://ffmpeg.org/download.html) to PATH\n    * Older versions of FFmpeg may not work\n3. Place your cookies in the same folder that you will run spotify-aac-downloader as `cookies.txt`\n    * You can export your cookies by using this Google Chrome extension on Spotify website: https://chrome.google.com/webstore/detail/open-cookiestxt/gdocmgbfkjnnpapoeobnolbbkoibbcif. Make sure to be logged in.\n4. Place your .wvd file in the same folder that you will run spotify-aac-downloader as `device.wvd`\n    * To get a .wvd file, you can use [dumper](https://github.com/wvdumper/dumper) to dump a L3 CDM from an Android device. Once you have the L3 CDM, use pywidevine to create the .wvd file from it.\n        1. Install pywidevine with pip\n            ```bash\n            pip install pywidevine pyyaml\n            ```\n        2. Create the .wvd file\n            ```bash\n            pywidevine create-device -t ANDROID -l 3 -k private_key.pem -c client_id.bin -o .\n            ```\n5. Install spotify-aac-downloader using pip\n    ```bash\n    pip install spotify-aac-downloader\n    ```\n\n## Examples\n* Download a song\n    ```bash\n    spotify-aac-downloader \"https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo\"\n    ```\n* Download an album\n    ```bash\n    spotify-aac-downloader \"https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1\"\n    ```\n\n## Configuration\nspotify-aac-downloader can be configured using the command line arguments or the config file. The config file is created automatically when you run spotify-aac-downloader for the first time at `~/.spotify-aac-downloader/config.json` on Linux and `%USERPROFILE%\\.spotify-aac-downloader\\config.json` on Windows. Config file values can be overridden using command line arguments.\n| Command line argument / Config file key                         | Description                                                           | Default value                                       |\n| --------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------- |\n| `-f`, `--final-path` / `final_path`                             | Path where the downloaded files will be saved.                        | `./Spotify`                                         |\n| `-t`, `--temp-path` / `temp_path`                               | Path where the temporary files will be saved.                         | `./temp`                                            |\n| `-c`, `--cookies-location` / `cookies_location`                 | Location of the cookies file.                                         | `./cookies.txt`                                     |\n| `-w`, `--wvd-location` / `wvd_location`                         | Location of the .wvd file.                                            | `./device.wvd`                                      |\n| `--config-location` / -                                         | Location of the config file.                                          | `<home_folder>/.spotify-aac-downloader/config.json` |\n| `--ffmpeg-location` / `ffmpeg_location`                         | Location of the FFmpeg binary.                                        | `ffmpeg`                                            |\n| `--aria2c-location` / `aria2c_location`                         | Location of the aria2c binary.                                        | `aria2c`                                            |\n| `--template-folder-album` / `template_folder_album`             | Template of the album folders as a format string.                     | `{album_artist}/{album}`                            |\n| `--template-folder-compilation` / `template_folder_compilation` | Template of the compilation album folders as a format string.         | `Compilations/{album}`                              |\n| `--template-file-single-disc` / `template_file_single_disc`     | Template of the song files for single-disc albums as a format string. | `{track:02d} {title}`                               |\n| `--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}`                        |\n| `--download-mode` / `download_mode`                             | Download mode.                                                        | `ytdlp`                                             |\n| `-e`, `--exclude-tags` / `exclude_tags`                         | List of tags to exclude from file tagging separated by commas.        | `null`                                              |\n| `--truncate` / `truncate`                                       | Maximum length of the file/folder names.                              | `40`                                                |\n| `-l`, `--log-level` / `log_level`                               | Log level.                                                            | `INFO`                                              |\n| `-p`, `--premium-quality` / `premium_quality`                   | Download in 256kbps AAC instead of 128kbps AAC.                       | `false`                                             |\n| `-l`, `--lrc-only` / `lrc_only`                                 | Download only the synced lyrics.                                      | `false`                                             |\n| `-n`, `--no-lrc` / `no_lrc`                                     | Don't download the synced lyrics.                                     | `false`                                             |\n| `-s`, `--save-cover` / `save_cover`                             | Save cover as a separate file.                                        | `false`                                             |\n| `-o`, `--overwrite` / `overwrite`                               | Overwrite existing files.                                             | `false`                                             |\n| `--print-exceptions` / `print_exceptions`                       | Print exceptions.                                                     | `false`                                             |\n| `-u`, `--url-txt` / -                                           | Read URLs as location of text files containing URLs.                  | `false`                                             |\n| `-n`, `--no-config-file` / -                                    | Don't use the config file.                                            | `false`                                             |\n\n### Tag variables\nThe following variables can be used in the template folder/file and/or in the `exclude_tags` list:\n- `album`\n- `album_artist`\n- `artist`\n- `comment`\n- `compilation`\n- `copyright`\n- `cover`\n- `disc`\n- `disc_total`\n- `isrc`\n- `label`\n- `lyrics`\n- `media_type`\n- `rating`\n- `release_date`\n- `title`\n- `track`\n- `track_total`\n\n### Download mode\nThe following download modes are available:\n* `ytdlp`\n* `aria2c`\n    * Faster than `ytdlp`\n    * Can be obtained from here: https://github.com/aria2/aria2/releases\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Download songs/albums/playlists directly from Spotify in AAC",
    "version": "1.5.4",
    "project_urls": {
        "repository": "https://github.com/glomatico/spotify-aac-downloader"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e587fb1487213a5bb2b1d9bd18c97f9667da7fa7bd2d3d02be2485df978c1a5a",
                "md5": "8d1cc53c2518456b87246428b6f3912c",
                "sha256": "170f6a693a513913d2d294ee806d34bf055b05382b35c9025f4158ec92fedfef"
            },
            "downloads": -1,
            "filename": "spotify_aac_downloader-1.5.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8d1cc53c2518456b87246428b6f3912c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 11790,
            "upload_time": "2024-01-30T21:49:51",
            "upload_time_iso_8601": "2024-01-30T21:49:51.617738Z",
            "url": "https://files.pythonhosted.org/packages/e5/87/fb1487213a5bb2b1d9bd18c97f9667da7fa7bd2d3d02be2485df978c1a5a/spotify_aac_downloader-1.5.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aeca33b04b69ad9a79546549095ddad96a589cea4bdccbdee3ec2e2e5acf6332",
                "md5": "c9f0b9712c1cad2846c110585a8eadcd",
                "sha256": "89f783cb6cbb44b61d30b2cfe4d7a4ac6734d7322940a02f170369d9b0a31a7a"
            },
            "downloads": -1,
            "filename": "spotify_aac_downloader-1.5.4.tar.gz",
            "has_sig": false,
            "md5_digest": "c9f0b9712c1cad2846c110585a8eadcd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 12185,
            "upload_time": "2024-01-30T21:49:53",
            "upload_time_iso_8601": "2024-01-30T21:49:53.010173Z",
            "url": "https://files.pythonhosted.org/packages/ae/ca/33b04b69ad9a79546549095ddad96a589cea4bdccbdee3ec2e2e5acf6332/spotify_aac_downloader-1.5.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 21:49:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "glomatico",
    "github_project": "spotify-aac-downloader",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "spotify-aac-downloader"
}
        
Elapsed time: 0.17236s