Skip to content

download

Download module for the console.

download(query, downloader) ¤

Find songs with the provided audio provider and save them to the disk.

Arguments¤
  • query: list of strings to search for.
Source code in spotdl/console/download.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
def download(
    query: List[str],
    downloader: Downloader,
) -> None:
    """
    Find songs with the provided audio provider and save them to the disk.

    ### Arguments
    - query: list of strings to search for.
    """

    # Parse the query
    songs = get_simple_songs(
        query,
        use_ytm_data=downloader.settings["ytm_data"],
        playlist_numbering=downloader.settings["playlist_numbering"],
        albums_to_ignore=downloader.settings["ignore_albums"],
        album_type=downloader.settings["album_type"],
    )

    # Download the songs
    downloader.download_multiple_songs(songs)